cmd warning: python interpreter is in a conda environment, but the environment has not been activated

ぐ巨炮叔叔 提交于 2021-02-05 08:01:30

问题


I installed Anaconda (added to path) but when I try to run Python from the cmd, I get the following message:

Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see 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.


回答1:


Follow below steps

1)open cmd and type "conda activate base"

2)then type python

Which will satisfy your problem




回答2:


Refer 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 4.4 allowed conda activate 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). Now these shells can use the conda activate command. Removing the need to modify PATH makes conda less disruptive to other software on your system. For more information, read the output from conda init --help.

One setting may be useful to you when using conda init is:

auto_activate_base: bool



来源:https://stackoverflow.com/questions/56623269/cmd-warning-python-interpreter-is-in-a-conda-environment-but-the-environment-h

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!