Spy*_*los 7 macos pip python-2.7
前言:我的OS X Python安装很乱.在我发现Homebrew之前,我开始使用Python系统.所以我一直在使用sudo pip install.我现在正在尝试清理所有内容,然后在Homebrew的Python上安装/链接pip包.
1)在许多SO答案中,人们建议这样做:pip freeze | xargs sudo pip uninstall -y这对我不起作用.我得到了很长的追溯.这些是最具代表性的部分:
~ $ pip freeze | xargs sudo pip uninstall -y
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The directory '/Users/smaniato/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling altgraph-0.10.2:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
[...]
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph/__init__.py', '/tmp/pip-p8yIlU-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-p8yIlU-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph/__init__.pyc', '/tmp/pip-p8yIlU-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph/__init__.pyc',
[...]
"[Errno 1] Operation not permitted: '/tmp/pip-p8yIlU-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph'")]
Run Code Online (Sandbox Code Playgroud)
这里altgraph只是第一个pip包pip list(记住这一点).
2)然后我pip freeze | xargs sudo -H pip uninstall -y按照警告的建议尝试了,但只是删除了警告.错误消息仍然存在.
3)我也尝试过任何引起投诉的目录(例如,~/Library/Caches/pip以及它的一些父母和孩子).出于某种原因,我不能chown成为最有问题的目录,/tmp:
~ $ sudo chown -R ${USER} /tmp
chown: /tmp: Operation not permitted
Run Code Online (Sandbox Code Playgroud)
4)最后,我尝试从列表的下方手动卸载软件包,瞧,我可以轻松地做sudo pip uninstall virtualenv一些例子.尝试手动卸载altgraph导致上述相同的错误.
任何想法如何进行?记住,我不关心任何一个包裹; 我只是想使用Homebrew的Python从头开始并从头开始.谢谢!
更新:
bdist-mpkg-0.5.0matplotlib,zope.interface,xattr,six,scipy,pytz.Spy*_*los 11
我很确定以brew reinstall python某种方式解决了我遇到的一些问题.然后,我还必须核实(即rm -rf)一些事情/usr/local/lib/python2.7/site-packages
与我的特定用例相关的问题和答案(OS X上的ROS安装):https://github.com/mikepurvis/ros-install-osx/issues/11
| 归档时间: |
|
| 查看次数: |
10535 次 |
| 最近记录: |