为什么'(base)' 出现在我的 anaconda 命令提示符中?

2022-01-10 00:00:00 python virtualenv anaconda

问题描述

我的 anaconda 命令提示符现在显示:

My anaconda command prompt now says:

(base) C:usersuser_name>

我想知道为什么 (base) 会出现在提示符前面.这开始出现,因为我创建了一个虚拟环境来运行 Django.如果我输入停用",提示就会消失,但如果我关闭终端并打开一个新终端,基地"又会回来.

I would like to know why (base) appears in front of the prompt. This started appearing since I created a virtual environment to run Django. If I enter 'deactivate' the prompt disappears but if I close the terminal and open a new terminal the 'base' is back again.

(base) C:usersuser_name> deactivate
C:usersuser_name>

问题是这个提示不能识别 pip 或任何 anaconda 命令.我可以在base"提示符下运行 pip,但不能在原始提示符上运行.我使用 pip 在 '(base)...' 中安装了一个模块,但是我的 ide 识别了这个模块.

The trouble is that this prompt does not recognize pip or any anaconda commands. I can run pip on the 'base' prompt, but not on the original one. I installed a module in '(base)...' using pip but this module is recognized by my ide.

conda list anaconda

in '(base)..' 给出了 Anaconda 的 4.4 版本.没有基础,它就无法识别 conda.在这发生之前,我已经多次运行 pip 和 conda .我正在运行 Windows 10.

in '(base)..' gives th version of Anaconda as 4.4. without the base, it does not recognize conda. I have run pip and conda several times before this happened. I'm running Windows 10.


解决方案

试试这个:

conda config --set auto_activate_base false

changeps1只是隐藏命令提示符,你还在这个环境中.

The changeps1 only hide the command prompt, you still in this environment.

auto_activate_base可以避免进入环境.

相关文章