简体   繁体   English

Python Anaconda解释器在conda环境下,但是环境没有激活

[英]Python Anaconda interpreter is in a conda environment, but the environment has not been activated

I have been using a working Anaconda Install (Python 3.7) for about a year, but suddenly I'm getting this warning when I run the interpreter:我已经使用 Anaconda 安装(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.
>>>

I quite often use virtual environments, but never with conda .我经常使用虚拟环境,但从不使用conda Note that I've been able to run python from the command line with just python for a long time now, and have never had to use conda activate base .请注意,我已经能够从命令行运行python很长一段时间了,现在只使用 python ,并且从来没有使用过conda activate base I don't even have conda on my path.我的道路上什至没有conda

I've found these answers, but neither gives any clarity into why this may have started happening:我找到了这些答案,但都没有明确说明为什么这可能已经开始发生:

cmd warning: python interpreter is in a conda environment, but the environment has not been activated cmd 警告:python 解释器处于 conda 环境,但该环境尚未激活

Python is in conda env, but has not been activated in Windows virtual env Python 在 conda 环境中,但尚未在 Windows 虚拟环境中激活

I have the same problem, by following this post conda-is-not-recognized-as-internal-or-external-command , I am able to solve the problem.我有同样的问题,通过遵循这个帖子conda-is-not-recognized-as-internal-or-external-command ,我能够解决问题。

The reason may be that your default Python interpreter has been switch to the the Conda python (eg on my Wondows 10, the path is C:\Users\Xiang\anaconda3\python.exe ).原因可能是您默认的 Python 解释器已切换到 Conda python (例如在我的 Wondows 10 上,路径是C:\Users\Xiang\anaconda3\python.exe Therefore, we need to add the Conda related path to the Environments Path, with details explained in the link.因此,我们需要将 Conda 相关路径添加到 Environments Path 中,详细信息在链接中进行了说明。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python解释器在Conda环境中,但是该环境没有被激活 - Python interpreter is in a Conda environment, but the environment has not been activated Windows CMD:“这个Python解释器在conda环境中,但是环境还没有激活” - Windows CMD: "This Python interpreter is in a conda environment, but the environment has not been activated" cmd警告:python解释器在conda环境中,但是环境没有被激活 - cmd warning: python interpreter is in a conda environment, but the environment has not been activated 警告“此 Python 解释器处于 conda 环境中,但该环境尚未激活” - Warning "This Python interpreter is in a conda environment, but the environment has not been activated" 这个Python解释器在conda环境下,但是环境还没有激活 - This Python interpreter is in a conda environment, but the environment has not been activated Python在conda环境下,但是在Windows虚拟环境下还没有激活 - Python is in a Conda environment, but it has not been activated in a Windows virtual environment 我从 Anaconda 打开 VScode 并在基于 conda 的 python 环境中运行它,但未激活 numpy - I opened VScode from Anaconda and running it in conda based python environment, but numpy is not activated 在激活 conda 环境的情况下,在 powershell 中使用 Python - Use Python in powershell with conda environment activated 如何在 Anaconda 环境中更改 Python 解释器路径? - How to change Python interpreter path in Anaconda environment? 使用特定安装的 Python 解释器创建 anaconda 环境 - Create an anaconda environment with an specific installed Python interpreter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM