Warning: This Python interpreter is in a conda environment, but the environment has not been activat

时间:2024-03-14 08:00:55

Win 环境下,安装了conda 和 自己的python 环境

 

cmd 下 输出python 报错

如下:

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”

大多CSDN解决方案是:

每次输如:conda activate base

但是这种方法并非长期有效,只能每次启动一次。

从根源上解决是因为conda python环境为默认环境,长期解决方案需要更改系统环境变量。我们安装Python环境的时候,默认安装在用户变量中

Warning: This Python interpreter is in a conda environment, but the environment has not been activat

 将Python环境变量添加到系统变量中,并且在conda环境之前。

 

Warning: This Python interpreter is in a conda environment, but the environment has not been activat