Anaconda Python激活环境变量的方法
在Windows10系统下,进入cmd,输入python,提示Anaconda环境变量未激活,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.针对这个问题,本文介绍Anaconda Python激活环境变量的方法。
-
第一,Windows10系统下,按Win+R键启动运行,输入cmd,进入命令窗口,输入
conda init
,对conda 进行初始化,如果之前做过这步操作,将提示no change. -
第二,接着输入
python
,如果Anaconda 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 -
第三,开始激活Anaconda Python的环境变量,输入
conda info --envs
,查看conda 环境变量的路径,base后边就是环境变量的路径。 -
第四,接着输入
conda activate +上述查到的环境变量路径
,激活环境变量。 -
第五,激活环境变量后,再次输入
python
,就不会提示Warning了。
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。