Jdog Jdog - 1 year ago 253
Python Question

Conda virtual envinment not changing under Windows

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

> conda create -n my-env anaconda

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

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

However, when running the activate.bat script to switch envinronment, although it appears to be successful the switch isn't 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

With the
indicating the active environment.

I have seen some issues with conda activate on Windows but haven't found this sepecific issue.

For further info: I am looking to copy the whole Anaconda package distribution and then install a dev version over one package.


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download