[英]Upgrading pip You are using pip version 7.1.2 to version 8.1.2
Hi I am trying to upgrade my pip version to 8.1.2 this command does not work: pip install --upgrade pip 嗨,我正在尝试将我的pip版本升级到8.1.2,此命令不起作用:pip install --upgrade pip
And I also tried to get it directly from the github directory, like explained here https://github.com/pypa/pip/archive/8.1.1.zip but then i get the following error: 而且我还尝试直接从github目录中获取它,就像这里解释的https://github.com/pypa/pip/archive/8.1.1.zip,但是随后出现以下错误:
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
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-21442.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.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
I m working on a Mac btw 我正在Mac上工作
尝试以管理员身份打开命令提示符,然后尝试升级它,应该可以。
Your problem is that your user doesn't have write privileges to the /Library/Python/2.7/site-packages
directory. 您的问题是您的用户没有对/Library/Python/2.7/site-packages
目录的写权限。 That is what it means by [Errno 13] Permission denied
这就是[Errno 13] Permission denied
Try running the command with sudo
prefixing the original command. 尝试使用sudo
前缀原始命令运行命令。 Sudo allows you to safely run programs as root. Sudo允许您以root用户身份安全地运行程序。 You will need to type your password at the prompt. 您将需要在提示符下输入密码。
You can follow it up with: 您可以执行以下操作:
pip install -U pip
sudo !!
This has the same effect as: 与以下内容具有相同的效果:
sudo pip install -U pip
Or even better, move away from OS X's Python install, and instead install Python / pip via Homebrew : 甚至更好的是,远离OS X的Python安装,而是通过Homebrew安装Python / pip:
brew install python
brew install python3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.