Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda virtual environment 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.

like image 301
Jdog Avatar asked Apr 25 '15 09:04

Jdog


1 Answers

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.

like image 111
asmeurer Avatar answered Oct 05 '22 23:10

asmeurer