Windows 下 Conda 虚拟环境不变 [英] Conda virtual environment not changing under Windows

查看:36
本文介绍了Windows 下 Conda 虚拟环境不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为 Windows 安装了 Anaconda 2.2.0 并通过以下方式创建了一个虚拟环境:

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

> conda create -n my-env anaconda

环境已成功创建,我在我的环境列表中看到它(实际上该目录位于 Anacondaenvs..)

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

但是,当运行 activate.bat 脚本来切换环境时,虽然看起来成功,但实际上并没有进行切换:

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

* 表示活动环境.

我在 Windows 上看到了一些 conda activate 问题,但没有发现这个具体问题.

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

更多信息:我希望复制整个 Anaconda 包分发,然后在一个包上安装开发版本.

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

推荐答案

如果你使用的是Powershell,activate目前不支持.您将需要手动修改 PATH,或者使用 cmd shell.

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.

这篇关于Windows 下 Conda 虚拟环境不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆