- mac下使用
sudo easy_install pip
会报错。 - 所以直接下载pip压缩包并解压。下载压缩包:pip-19.2.1.tar.gz
- 打开终端,从终端进入pip解压后的目录。
- 然后执行
sudo python setup.py install
安装pip.
附pip官网
注意:
-
python setup.py install 前要加sudo,不然会报权限错误。
image.png
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-8868.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
网友评论