无法在Miniconda中激活虚拟环境 [英] Can't activate virtual environment in Miniconda
问题描述
当我在Windows 8上的Miniconda中创建虚拟环境并在PowerShell中将其激活( activate env)时,它表示该环境已被激活,但是在键入 conda env list时,它表明我仍然在根环境中。我检查了Miniconda中的envs文件夹,并且有env的文件夹在那里,并且似乎可以用于Python发行版以及所有内容,但是由于某些原因,我无法进入环境本身。出于某种原因,当我使用命令提示符时它可以工作,但这不是理想的解决方案,因为我希望能够在PowerShell中执行所有操作。
When I create a virtual environment in Miniconda on Windows 8 and activate it in PowerShell ("activate env"), it says the environment is being activated, but upon typing "conda env list", it shows me that I'm still in the root environment. I checked the envs folder in Miniconda, and the folder with the env is there and seems to be fine with a Python distribution and everything, but for some reason I'm unable to go into the environment itself. For some reason, it works when I use the Command Prompt instead, but this isn't an ideal solution, since I'd like to be able to do everything in PowerShell.
任何帮助将不胜感激。
推荐答案
activate当前不支持Powershell。您需要手动修改路径,或者在环境中调用Python的完整路径。
activate currently doesn't support Powershell. You'll need to modify your path manually, or else call the full path to the Python in the environment.
这篇关于无法在Miniconda中激活虚拟环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!