以下问题是针对:
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'.
“WARNING: The conda.compat module is deprecated and will be removed in a future release.”
1.我自己是之前安装了Python3.5的版本,又通过Anaconda安装了python2.7的版本,通过:复制一份Anaconda目录下的python.exe的副本在该目录中,并改名为python2.exe;Python35目录下的python.exe同理,复制一份,改为python3.exe,实现cmd或者bash中,python2指令打开python2.7,python3指令打开python3.5
2.上述操作基本完成了两个版本的python的调用,但是可能是因为python2.7是Anaconda附带的,所以需要在Anaconda目录下运行cmd,通过python2才能打开python2.7
3.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
按照网上其他的经验贴,conda activate myenv 或者:1.conda info --envs 然后 conda activate C:\Users\X_S\Anaconda2 (这是我自己的目录),依旧报错
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'.
4.最后在https://github.com/conda/conda/issues/8412 conda的github的issue里面找了解决办法
指令是 activate base ps:界面和cmd稍有不同,因为我用了cmder(基本和cmd一样,界面好看一点),不过不影响
5.可以发现还是有一个Waring,“WARNING: The conda.compat module is deprecated and will be removed in a future release.”
这个是conda 4.6.11的一个bug ,conda update conda 指令,更新一下conda就没了