windows命令行切换python版本,,安装2.x 和 3.


安装2.x 和 3.x 的python

我这里使用anaconda来安装两个版本的python包。

conda create --name python2 python=2.7conda create --name python23 python=2.7

安装完之后,在你的anaconda程序目录下会发现:
技术图片


设置系统环境变量

技术图片


pip的使用

安装的时候,最好加上清华源,不然可以因为网络问题报错。

python2 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simplepython3 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simplepython2 -m pip listpython3 -m pip list

参考

https://blog.csdn.net/fxjzzyo/article/details/77070868

windows命令行切换python版本

评论关闭