文章标题

来源:互联网 发布:软件项目立项过程 编辑:程序博客网 时间:2024/05/29 16:51

mac下使用更新pip失败的原因

在mac系统下,更行pip会提醒你是用命令:

pip install --upgrade pip

这个时候还是会有错误,错误的内容是error13:

Exception:Traceback (most recent call last):  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main    status = self.run(options, args)  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run    root=options.root_path,  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 640, in install    requirement.uninstall(auto_confirm=True)  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 726, in uninstall    paths_to_remove.remove(auto_confirm)  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove    renames(path, new_path)  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/__init__.py", line 314, 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-7.1.0-py2.7.egg/EGG-INFO/dependency_links.txt'

这个时候就使用命令:

sudo pip install --upgrade pip

这个时候基本就可以了,如果出现read timeout 问题,那就是pip的资源被墙了的问题,这个时候就是另外一个问题了

0 0
原创粉丝点击