在cmd输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has no

警告内容为:
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

**

处理方法

1.输入conda info --envs

确定当前环境 ,星(*)号后面就是当前环境。

例如:* D:\Anaconda3
在cmd输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has no_第1张图片
2.输入conda activate D:\Anaconda3
(1)如果出现下面的情况就成功啦
在cmd输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has no_第2张图片

(2)如果出现下面的情况:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.
If using ‘conda activate’ from a batch script, change your
invocation to ‘CALL conda.bat activate’.
在cmd输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has no_第3张图片
那么就需要再输入CALL conda.bat activate,就会成功啦
在cmd输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has no_第4张图片

**

你可能感兴趣的:(python,anaconda)