升级点错误消息 [英] Upgrade Pip error message

查看:75
本文介绍了升级点错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跑步时

    pip install --upgrade pip

我收到此错误消息:

    Collecting pip
    Downloading pip-8.1.0-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 371kB/s 
    Installing collected packages: pip
    Found existing installation: pip 8.0.2
    Uninstalling pip-8.0.2:
    Exception:
    Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line       209, in main
    status = self.run(options, args)
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line  725, in install
    requirement.uninstall(auto_confirm=True)
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 752, in uninstall
    paths_to_remove.remove(auto_confirm)
    File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py",line 115, in remove
    renames(path, new_path)
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 266,   in renames
    shutil.move(old, new)
    File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
    OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site- packages/pip-8.0.2.dist-info/DESCRIPTION.rst'

以前,我一直在努力安装和运行几个python模块,因此我记得稍微移动文件.是什么导致了此错误?我怎样才能解决这个问题?我在Mac上.

Previously I had been struggling to install and run a couple of python modules so I remember moving files around a bit. Is that what has caused this error? How can I fix this? I am on Mac.

在此之前,我尝试安装bs4,并且收到类似的错误消息. (但我怀疑bs4安装有更多问题,所以这是稍后要讨论的另一个问题).

I was trying to install bs4 prior to this and I got similar error messages. (But i suspect the bs4 install has more issues so that's another question for later).

对于代码的任何格式问题,也深表歉意.尽力使它看起来像在终端上一样.

Also sorry for any format issues with the code. Have tried my best to make it look like it is on the terminal.

谢谢.

推荐答案

权限问题意味着您的用户权限不允许您在所需的文件夹(/Library/Python/2.7/site-packages/pip/)上进行写操作.您基本上可以做两件事:

A permission issue means your user privileges don't allow you to write on the desired folder(/Library/Python/2.7/site-packages/pip/). There's basically two things you can do:

  1. 以sudo的身份运行pip:

  1. run pip as sudo:

sudo pip install --upgrade pip

  • 将pip配置为仅为当前用户安装,如.
  • 这篇关于升级点错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆