我用的是Windows 8, Anaconda 1.7.5 64bit。
我创建了一个新的蟒蛇环境
Conda create -p ./test python=2.7 PIP
从C: \公关\ TEMP \ venv \。
这工作得很好(有一个带有新的python发行版的文件夹)。康达让我打字
激活C: \公关\ TEMP \ venv \测试
激活环境,然而,这将返回:
在C:\PR\Anaconda\envs中不存在名为“C:\PR\temp\venv\test”的环境
如何激活环境?我做错了什么?
前面所有的答案似乎都过时了。
在Conda 4.4和4.6中引入了Conda activate。
conda activate: The logic and mechanisms underlying environment activation have been reworked. With conda 4.4, conda activate and conda deactivate are now the preferred commands for activating and deactivating environments. You’ll find they are much more snappy than the source activate and source deactivate commands from previous conda versions. The conda activate command also has advantages of (1) being universal across all OSes, shells, and platforms, and (2) not having path collisions with scripts from other packages like python virtualenv’s activate script.
例子
conda create -n venv-name python=3.6
conda activate -n venv-name
conda deactivate
这些新的子命令在“Anaconda Prompt”和“Anaconda Powershell Prompt”中自动可用。要在每个shell(普通的cmd.exe和powershell)中使用conda activate,请在Windows上的每个shell中检查expose conda命令。
参考文献
如何为conda 4.4的发布做好准备
Conda 4.6发布
前面所有的答案似乎都过时了。
在Conda 4.4和4.6中引入了Conda activate。
conda activate: The logic and mechanisms underlying environment activation have been reworked. With conda 4.4, conda activate and conda deactivate are now the preferred commands for activating and deactivating environments. You’ll find they are much more snappy than the source activate and source deactivate commands from previous conda versions. The conda activate command also has advantages of (1) being universal across all OSes, shells, and platforms, and (2) not having path collisions with scripts from other packages like python virtualenv’s activate script.
例子
conda create -n venv-name python=3.6
conda activate -n venv-name
conda deactivate
这些新的子命令在“Anaconda Prompt”和“Anaconda Powershell Prompt”中自动可用。要在每个shell(普通的cmd.exe和powershell)中使用conda activate,请在Windows上的每个shell中检查expose conda命令。
参考文献
如何为conda 4.4的发布做好准备
Conda 4.6发布