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

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

安装完之后,在你的anaconda程序目录下会发现:
Win命令行切换Python版本

设置系统环境变量

Win命令行切换Python版本

pip的使用

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

python2 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install termcolor -i https://pypi.tuna.tsinghua.edu.cn/simple

python2 -m pip list
python3 -m pip list

参考

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

相关文章:

  • 2021-12-13
  • 2021-08-10
  • 2021-05-21
  • 2021-11-18
  • 2021-12-12
  • 2021-09-24
  • 2021-09-24
  • 2021-09-24
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
相关资源
相似解决方案