Python Anaconda解释程序处于conda环境中,但尚未激活该环境

时间:2020-06-11 20:32:09

标签: python python-3.x anaconda

我一直在使用可以正常运行的Anaconda Install(Python 3.7)大约一年,但是突然我在运行解释器时收到此警告:

> python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32

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

Type "help", "copyright", "credits" or "license" for more information.
>>>

我经常使用虚拟环境,但从未使用conda。请注意,很长一段时间以来,我已经能够从命令行仅使用python来运行python,而不必使用conda activate base。我什至没有conda的踪迹。

我找到了这些答案,但是都没有清楚说明为什么可能会开始发生:

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

Python is in conda env, but has not been activated in Windows virtual env

1 个答案:

答案 0 :(得分:0)

我有同样的问题,通过关注这篇帖子conda-is-not-recognized-as-internal-or-external-command,我能够解决问题。

原因可能是您的默认 Python 解释器已切换到 Conda python(例如,在我的 Wondows 10 上,路径为 C:\Users\Xiang\anaconda3\python.exe)。因此,我们需要将Conda相关路径添加到Environments Path中,详情在链接中说明。