Repository: conda/conda

Issue:
Not able to install Udacity car Simulator

(C:\Users\Heeramani\Anaconda2) C:\Users\Heeramani>conda env create -f environments.yml
Using Anaconda API: https://api.anaconda.org
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues



Current conda install:

               platform : win-64
          conda version : 4.3.14
       conda is private : False
      conda-env version : 4.3.14
    conda-build version : not installed
         python version : 2.7.13.final.0
       requests version : 2.12.4
       root environment : C:\Users\Heeramani\Anaconda2  (writable)
    default environment : C:\Users\Heeramani\Anaconda2
       envs directories : C:\Users\Heeramani\Anaconda2\envs
                          C:\Users\Heeramani\AppData\Local\conda\conda\envs
                          C:\Users\Heeramani\.conda\envs
          package cache : C:\Users\Heeramani\Anaconda2\pkgs
                          C:\Users\Heeramani\AppData\Local\conda\conda\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/win-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : None
           offline mode : False
             user-agent : conda/4.3.14 requests/2.12.4 CPython/2.7.13 Windows/10 Windows/10.0.14393



`$ C:\Users\Heeramani\Anaconda2\Scripts\conda-env-script.py create -f environments.yml`




    Traceback (most recent call last):
      File "C:\Users\Heeramani\Anaconda2\lib\site-packages\conda\exceptions.py", line 573, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Users\Heeramani\Anaconda2\lib\site-packages\conda_env\cli\main_create.py", line 78, in execute
        directory=os.getcwd())
      File "C:\Users\Heeramani\Anaconda2\lib\site-packages\conda_env\specs\__init__.py", line 23, in detect
        raise SpecNotFound(build_message(specs))
    SpecNotFound: Runtime error: Can't process without a name
    Conda Env Exception: environments.yml file not found
    There is no requirements.txt


Discussion:

Resolving patch:
diff --git a/conda_env/cli/main_create.py b/conda_env/cli/main_create.py
--- a/conda_env/cli/main_create.py
+++ b/conda_env/cli/main_create.py
@@ -5,11 +5,11 @@
 import sys
 import textwrap
 
+from conda._vendor.auxlib.path import expand
 from conda.cli import install as cli_install
 from conda.cli.conda_argparse import add_parser_json, add_parser_prefix
 from conda.gateways.disk.delete import rm_rf
 from conda.misc import touch_nonadmin
-
 from .common import get_prefix
 from .. import exceptions, specs
 from ..installers.base import InvalidInstaller, get_installer
@@ -75,7 +75,7 @@ def execute(args, parser):
     name = args.remote_definition or args.name
 
     try:
-        spec = specs.detect(name=name, filename=args.file,
+        spec = specs.detect(name=name, filename=expand(args.file),
                             directory=os.getcwd())
         env = spec.environment
 
diff --git a/conda_env/cli/main_update.py b/conda_env/cli/main_update.py
--- a/conda_env/cli/main_update.py
+++ b/conda_env/cli/main_update.py
@@ -3,6 +3,7 @@
 import sys
 import textwrap
 
+from conda._vendor.auxlib.path import expand
 from conda.cli import install as cli_install
 from conda.cli.conda_argparse import add_parser_json, add_parser_prefix
 from conda.misc import touch_nonadmin
@@ -66,7 +67,7 @@ def execute(args, parser):
     name = args.remote_definition or args.name
 
     try:
-        spec = install_specs.detect(name=name, filename=args.file,
+        spec = install_specs.detect(name=name, filename=expand(args.file),
                                     directory=os.getcwd())
         env = spec.environment
     except exceptions.SpecNotFound:


Test patch: