Windows下同时安装Py2和Py3

Windows下同时安装Py2和Py3


安装python2 3两个版本

首先安装Python2,确认好Python2的安装位置。接着安装Python3,并确定Python3的安装位置。
确认系统变量PATH中有python2和python3各自两个的路径,如:

  • D:\Program Files\Python\Python27\
  • D:\Program Files\Python\Python27\Scripts\
  • D:\Program Files\Python\Python36\
  • D:\Program Files\Python\Python36\Scripts\

最后,将python2,python3目录中的python和pythonw两个.exe在python后追加各自的版本2和3。


处理两个python的pip共存问题

接下来,处理pip的问题。
分别运行:
python2 -m pip install --upgrade pip --force-install
python3 -m pip install --upgrade pip --force-install
至此,修改完毕。python2和python3版本将同时存在系统中。pip也同时存在。

猜你喜欢

转载自blog.csdn.net/YeYuLuoJin/article/details/75226062
今日推荐