windows环境下区分python2和3的pip

1.安装好python2和3后分别配置好环境变量;

2.将python2安装目录中python.exe pythonw.exe更改为python2.exe和pythonw2.exe;

3.给python2重新安装pip

python2 -m pip install --upgrade pip --force-reinstall

4.查看结果

C:\Users\77962>pip2 -V
pip 19.3.1 from c:\users\77962\.windows-build-tools\python27\lib\site-packages\pip (python 2.7)

C:\Users\77962>pip -V
pip 9.0.1 from D:\software\Anaconda3\lib\site-packages (python 3.6)

参考:https://blog.csdn.net/kaikai136412162/article/details/81839785

发布了106 篇原创文章 · 获赞 8 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_43667990/article/details/103000743