Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

python - 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 Anacondaenvs..)

> conda info -e
# conda environments:
#
my-env                   D:Anacondaenvsmy-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:Anacondaenvsmy-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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...