OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/EGG-INFO

MacBook:gym yangyang$ pip install -U pip

Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b

  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded

Installing collected packages: pip

  Found existing installation: pip 1.5

    Uninstalling pip:

Cleaning up...

Exception:

Traceback (most recent call last):

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/basecommand.py", line 122, in main

    status = self.run(options, args)

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/commands/install.py", line 275, in run

    requirement_set.install(install_options, global_options, root=options.root_path)

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 1367, in install

    requirement.uninstall(auto_confirm=True)

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 585, in uninstall

    paths_to_remove.remove(auto_confirm)

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 1768, in remove

    renames(path, new_path)

  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/util.py", line 294, in renames

    shutil.move(old, new)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move

    rmtree(src)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 247, in rmtree

    rmtree(fullname, ignore_errors, onerror)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree

    onerror(os.remove, fullname, sys.exc_info())

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree

    os.remove(fullname)

OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/EGG-INFO/dependency_links.txt'


解决方法:

sudo chown -R $USER /Library/Python/2.7

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值