Conda importing an existing environment error

224 Views Asked by At

I'm trying to import an existing environment through conda using the code:

conda env create -f D:\Courses\Udacity-Courses\'Introduction to Data Analysis'\Supporting-Material\dand-env-win.yaml

but I get this error message:

  environment variables:
                 CIO_TEST=<not set>
  CONDA_AUTO_UPDATE_CONDA=false
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=C:\Users\nader\anaconda3\Scripts\conda.exe
             CONDA_PREFIX=C:\Users\nader\anaconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=C:\Users\nader\anaconda3\python.exe
               CONDA_ROOT=C:\Users\nader\anaconda3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\nader
                     PATH=C:\Users\nader\anaconda3;C:\Users\nader\anaconda3\Library\mingw-w64\bi
                          n;C:\Users\nader\anaconda3\Library\usr\bin;C:\Users\nader\anaconda3\Li
                          brary\bin;C:\Users\nader\anaconda3\Scripts;C:\Users\nader\anaconda3\bi
                          n;C:\Users\nader\anaconda3;C:\Users\nader\anaconda3\Library\mingw-w64\
                          bin;C:\Users\nader\anaconda3\Library\usr\bin;C:\Users\nader\anaconda3\
                          Library\bin;C:\Users\nader\anaconda3\Scripts;C:\Users\nader\anaconda3\
                          bin;C:\Users\nader\anaconda3\condabin;C:\Program Files (x86)\NVIDIA Co
                          rporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\Syste
                          m32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System3
                          2\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine
                          Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
                          Components\DAL;C:\Program Files\Microsoft SQL Server\Client
                          SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL
                          Server\120\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\120\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\120\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows
                          Performance Toolkit;C:\Program Files\dotnet;C:\Program
                          Files\Git\cmd;C:\Program Files\Microsoft SQL Server\Client
                          SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tool
                          s\Binn;C:\Users\nader\AppData\Local\Programs\Python\Python310\Scripts;
                          C:\Users\nader\AppData\Local\Programs\Python\Python310;C:\Users\nader\
                          AppData\Local\Microsoft\WindowsApps;C:\Users\nader\.dotnet\tools;C:\Us
                          ers\nader\AppData\Local\atom\bin;C:\Users\nader\AppData\Local\GitHubDe
                          sktop\bin
             PSMODULEPATH=C:\Users\nader\Documents\WindowsPowerShell\Modules;C:\Program Files\Wi
                          ndowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Mod
                          ules;C:\Program Files (x86)\Microsoft SQL
                          Server\120\Tools\PowerShell\Modules\
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : C:\Users\nader\anaconda3
            shell level : 1
       user config file : C:\Users\nader\.condarc
 populated config files : C:\Users\nader\.condarc
          conda version : 4.13.0
    conda-build version : 3.21.8
         python version : 3.9.12.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\nader\anaconda3  (writable)
      conda av data dir : C:\Users\nader\anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
                          https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\nader\anaconda3\pkgs
                          C:\Users\nader\.conda\pkgs
                          C:\Users\nader\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\nader\anaconda3\envs
                          C:\Users\nader\.conda\envs
                          C:\Users\nader\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.13.0 requests/2.27.1 CPython/3.9.12 Windows/10 Windows/10.0.19044
          administrator : False
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?  

This is the .yaml file I'm trying to import

name: DAND
channels: !!python/tuple
- defaults
dependencies:
- _nb_ext_conf=0.3.0=py27_0
- anaconda-client=1.6.0=py27_0
- backports=1.0=py27_0
- backports_abc=0.5=py27_0
- beautifulsoup4=4.5.1=py27_0
- clyent=1.2.2=py27_0
- colorama=0.3.7=py27_0
- configparser=3.5.0=py27_0
- cycler=0.10.0=py27_0
- decorator=4.0.10=py27_1
- entrypoints=0.2.2=py27_0
- enum34=1.1.6=py27_0
- functools32=3.2.3.2=py27_0
- get_terminal_size=1.0.0=py27_0
- icu=57.1=vc9_0
- ipykernel=4.5.2=py27_0
- ipython=5.1.0=py27_0
- ipython_genutils=0.1.0=py27_0
- ipywidgets=5.2.2=py27_0
- jinja2=2.8=py27_1
- jpeg=8d=vc9_2
- jsonschema=2.5.1=py27_0
- jupyter=1.0.0=py27_3
- jupyter_client=4.4.0=py27_0
- jupyter_console=5.0.0=py27_0
- jupyter_core=4.2.1=py27_0
- libpng=1.6.22=vc9_0
- markupsafe=0.23=py27_2
- matplotlib=1.5.3=np111py27_1
- mistune=0.7.3=py27_0
- mkl=11.3.3=1
- nb_anacondacloud=1.2.0=py27_0
- nb_conda=2.0.0=py27_0
- nb_conda_kernels=2.0.0=py27_0
- nbconvert=4.2.0=py27_0
- nbformat=4.2.0=py27_0
- nbpresent=3.0.2=py27_0
- nltk=3.2.1=py27_0
- notebook=4.3.0=py27_0
- numpy=1.11.2=py27_0
- openssl=1.0.2j=vc9_0
- pandas=0.19.1=np111py27_0
- path.py=8.2.1=py27_0
- pathlib2=2.1.0=py27_0
- pickleshare=0.7.4=py27_0
- pip=9.0.1=py27_1
- prompt_toolkit=1.0.9=py27_0
- pygments=2.1.3=py27_0
- pymongo=3.3.0=py27_0
- pyparsing=2.1.4=py27_0
- pyqt=5.6.0=py27_1
- python=2.7.12=0
- python-dateutil=2.6.0=py27_0
- pytz=2016.10=py27_0
- pyyaml=3.12=py27_0
- pyzmq=16.0.2=py27_0
- qt=5.6.2=vc9_0
- qtconsole=4.2.1=py27_2
- requests=2.12.3=py27_0
- scikit-learn=0.17.1=np111py27_1
- scipy=0.18.1=np111py27_0
- seaborn=0.7.1=py27_0
- setuptools=27.2.0=py27_1
- simplegeneric=0.8.1=py27_1
- singledispatch=3.4.0.3=py27_0
- sip=4.18=py27_0
- six=1.10.0=py27_0
- ssl_match_hostname=3.4.0.2=py27_1
- tk=8.5.18=vc9_0
- tornado=4.4.2=py27_0
- traitlets=4.3.1=py27_0
- unicodecsv=0.14.1=py27_0
- vs2008_runtime=9.00.30729.1=2
- wcwidth=0.1.7=py27_0
- wheel=0.29.0=py27_0
- widgetsnbextension=1.2.6=py27_0
- win_unicode_console=0.5=py27_0
- xlrd=1.0.0=py27_0
- zlib=1.2.8=vc9_3
- pip:
  - backports-abc==0.5
  - backports.shutil-get-terminal-size==1.0.0
  - backports.ssl-match-hostname==3.4.0.2
  - ipython-genutils==0.1.0
  - jupyter-client==4.4.0
  - jupyter-console==5.0.0
  - jupyter-core==4.2.1
  - nb-anacondacloud==1.2.0
  - nb-conda==2.0.0
  - nb-conda-kernels==2.0.0
  - prompt-toolkit==1.0.9
  - win-unicode-console==0.5  
prefix: C:\Users\IEUser\Anaconda3\envs\DAND 

I searched for solutions but I didn't find any, and I also tried to upgrade the conda package.
so what should I do to fix this?
........................................................................

1

There are 1 best solutions below

0
merv On

Errors could come from:

  1. !!python/tuple - get rid of that.
  2. Trying to create an environment that already exists. Use a -n argument to provide a name for the new environment, otherwise Conda will try to use the existing one.

Other issues that might prevent solving, but not necessarily errors:

  1. Packages in Conda and Pip sections. Delete any packages already in Conda section from the pip: section. E.g., jupyter-client==4.4.0, nb-anacondacloud==1.2.0, etc.

  2. Very old environment. Many of the package builds are migrated to free channel. Probably should add free to the channels, e.g.:

    channels:
      - defaults
      - free