[英]cmd warning: python interpreter is in a conda environment, but the environment has not been activated
I installed Anaconda (added to path) but when I try to run Python from the cmd, I get the following message:我安装了 Anaconda(添加到路径)但是当我尝试从 cmd 运行 Python 时,我收到以下消息:
Warning: This Python interpreter is in a conda environment, but the environment has not been activated.警告:此 Python 解释器在 conda 环境中,但该环境尚未激活。 Libraries may fail to load.
库可能无法加载。 To activate this environment please see https://conda.io/activation
要激活此环境,请参阅https://conda.io/activation
I followed the link and tried to activate the environment, but my cmd then changes to (base) mode, which I am unfamiliar with.我按照链接尝试激活环境,但我的 cmd 然后更改为(基本)模式,这是我不熟悉的。
Follow below steps按照以下步骤操作
1)open cmd and type "conda activate base" 1)打开cmd并输入“conda activate base”
2)then type python 2)然后输入python
Which will satisfy your problem这将满足您的问题
Refer https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html请参阅https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Earlier versions of conda introduced scripts to make activation behavior uniform across operating systems.早期版本的 conda 引入了脚本,以使跨操作系统的激活行为统一。 Conda 4.4 allowed conda activate myenv.
Conda 4.4 允许 conda 激活 myenv。 Conda 4.6 added extensive initialization support so that conda works faster and less disruptively on a wide variety of shells (bash, zsh, csh, fish, xonsh, and more).
Conda 4.6 添加了广泛的初始化支持,以便 conda 在各种 shell(bash、zsh、csh、fish、xonsh 等)上运行速度更快,中断更少。 Now these shells can use the conda activate command.
现在这些 shell 可以使用 conda activate 命令。 Removing the need to modify PATH makes conda less disruptive to other software on your system.
无需修改 PATH 可以减少 conda 对系统上其他软件的破坏。 For more information, read the output from conda init --help.
有关更多信息,请阅读 conda init --help 的输出。
One setting may be useful to you when using conda init is:使用 conda init 时,一项设置可能对您有用:
auto_activate_base: bool auto_activate_base: bool
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.