Mac 上的 pip2 与 pip3 共存笔记
这里不想启用pyenv
下载 get-pip.py
1
curl -O https://bootstrap.pypa.io/get-pip.py
首先安装pip (pip2)
1
sudo python2 get-pip.py
再安装 pip3
1
sudo python3 get-pip.py
测试:
1
2
3
4
5
6
$ pip -V
pip 18.1 from /Library/Python/2.7/site-packages/pip-18.1-py2.7.egg/pip (python 2.7)
$ pip2 -V
pip 18.1 from /Library/Python/2.7/site-packages/pip-18.1-py2.7.egg/pip (python 2.7)
$ pip3 -V
pip 18.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
如果失败就动用 easy_install
来安装:
1
sudo easy_install pip
本文网址: https://pylist.com/topic/172.html 转摘请注明来源