Mac 上的 pip2 与 pip3 共存笔记
这里不想启用pyenv
下载 get-pip.py
curl -O https://bootstrap.pypa.io/get-pip.py
首先安装pip (pip2)
sudo python2 get-pip.py
再安装 pip3
sudo python3 get-pip.py
测试:
$ 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
来安装:
sudo easy_install pip