朋友说激活环境后python
版本并没有变成对应环境的版本,原来他用的是conda activate env
, conda
版本为4.5.4
. 据<Python Anaconda: should I use conda activate
or source activate
in linux>:
The logic and mechanisms underlying environment activation have been reworked. With conda 4.4, conda activate and conda deactivate are now the preferred commands for activating and deactivating environments. You’ll find they are much more snappy than the source activate and source deactivate commands from previous conda versions.
按理说,conda activate
理应比source activate
好用, 然而并没有发挥作用, 我想应该是用source
的话会更新一遍环境变量, 所以可以较好的切换python
版本吧.