osx - Cannot "sudo pip uninstall" operation not permitted (/tmp) in OS X El Capitan -
preface: os x python installation mess. started using system python way before found out homebrew. , i've been using sudo pip install since forever. i'm trying clean , install/link pip packages against homebrew's python.
1) in many answers, people suggest doing: pip freeze | xargs sudo pip uninstall -y doesn't work me. long traceback. these representative chunks of it:
~ $ pip freeze | xargs sudo pip uninstall -y using pip version 7.1.2, version 8.0.2 available. should consider upgrading via 'pip install --upgrade pip' command. directory '/users/smaniato/library/caches/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, 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'")] where altgraph first pip package in pip list (keep in mind).
2) tried pip freeze | xargs sudo -h pip uninstall -y, warning suggested, remove warning. error messages persisted.
3) tried chown-ing directories raised complaints (e.g., ~/library/caches/pip , of parents , children). reason, cannot chown problematic directory, /tmp:
~ $ sudo chown -r ${user} /tmp chown: /tmp: operation not permitted 4) finally, tried manually uninstalling package further down list , voila, sudo pip uninstall virtualenv example. attempting manually uninstall altgraph results in same error above.
any ideas how proceed? remember, don't care 1 package; want nuke pip , start scratch using homebrew's python. thanks!
updates:
- going down list manually, same thing happens
bdist-mpkg-0.5.0 - a few more:
matplotlib,zope.interface,xattr,six,scipy,pytz.
i'm pretty sure brew reinstall python somehow fixed bunch of issues having. had nuke (i.e., rm -rf) few things in /usr/local/lib/python2.7/site-packages
issue , answer related specific use case (ros installation on os x): https://github.com/mikepurvis/ros-install-osx/issues/11
Comments
Post a Comment