Anaconda环境尚未激活? [英] Anaconda environment has not been activated?

查看:205
本文介绍了Anaconda环境尚未激活?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了Anaconda,并将其添加到我的Path中,所以当我在命令终端中键入python时,默认的Python是Anaconda,但我不断收到以下警告:

I've downloaded Anaconda and I've added it to my Path, so when I type python in the command terminal the default Python is the Anaconda one, but I keep getting the following warning:

警告:此Python解释器位于conda环境中,但是环境尚未激活.库可能无法加载.到激活此环境,请参见 https://conda.io/activation .

现在,我可以通过在加载python之前输入conda activate base来解决此问题,这将使我进入基本环境.

Now, I can fix this by typing in conda activate base before I load python, which takes me to the base environment.

这是我每次必须做的吗?还是有一种方法可以永久激活基本环境?

Is this what I have to do every time? Or is there a way to permanently activate the base environment?

推荐答案

警告消息告诉您,找到了来自conda环境的Python解释器,但是尚未调用conda activate.您是否将conda env的bin/目录放入Windows搜索路径?那是错误的.

The warning message tells you that the Python interpreter from the conda environment was found, but that conda activate has not been called. Did you put the bin/ directory of the conda env into the Windows search path? That would be wrong.

您正在谈论虚拟环境.但是Python虚拟环境不是conda环境.也许您混淆了这两个概念?

You're talking about virtual envs. But Python virtual environments are something else than conda environments. Maybe you mixed up the two concepts?

conda基础环境中的Python解释器不会抱怨缺少激活,因为它是由一些conda子命令调用的,并且可以在没有激活环境的情况下工作.但是,在使用该conda环境时,您也应该调用conda激活库.

The Python interpreter from the conda base environment does not complain about missing activation, because it's called by some of the conda subcommands and can work without an activated environment. Nevertheless, you should call conda activate base when working with that conda environment, too.

谢谢.

这篇关于Anaconda环境尚未激活?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆