Conda virtual environment does not change under Windows

I installed Anaconda 2.2.0 for Windows and created a virtual environment through:

> conda create -n my-env anaconda 

The environment is successfully created, and I see it in my list of envinronments (and indeed, the directory is in Anaconda \ envs ..)

 > conda info -e # conda environments: # my-env D:\Anaconda\envs\my-env root * D:\Anaconda 

However, when you run the activate.bat script to switch the envinronment, although it seems to be successful, the switch is not actually made:

 > activate.bat my-env Activating environment "astropy-dev"... > conda list -e # conda environments: # my-env D:\Anaconda\envs\my-env root * D:\Anaconda 

C * indicating the active medium.

I saw some problems with conda enabled on Windows, but did not find this specific problem.

For more information: I want to copy the entire distribution package of Anaconda package, and then install the dev version on one package.

+7
python windows conda anaconda
source share
4 answers

If you are using Powershell, activate does not currently support it. You will need to change your PATH manually or use the cmd shell.

+9
source share

Are you calling activate from a script package? Then it should be call activate my-env .

+1
source share

You do not need .bat. It just activates my-env.

0
source share

You team

 activate astropy-dev 

must be launched from the D: \ Anaconda directory. Then it should work. To check, enter:

 conda info -e 
0
source share

All Articles