Numpy: 为什么我不能卸载 numpy (python) ? 怎么做 ?

创建于 2016-11-13  ·  6评论  ·  资料来源: numpy/numpy

numpy git:(master) sudo pip   uninstall  numpy


The directory '/Users/tonylibai/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.
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.8.0rc1:
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/uninstall.py", line 76, in run
    requirement_set.uninstall(auto_confirm=options.yes)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 346, in uninstall
    req.uninstall(auto_confirm=auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-gCa9Bv-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'
The directory '/Users/tonylibai/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.`

```

最有用的评论

我需要“如何”,

你给出“为什么”,

请给别人你的帮助。

所有6条评论

错误消息非常清楚: Operation not permitted 。 那就是你没有完成这项工作的权限。

你能告诉我,如何卸载?

错误信息已经为您指引了方向:

目录 '/Users/tonylibai/Library/Caches/pip/http' 或其父目录不归当前用户所有,缓存已被禁用。 请检查该目录的权限和所有者。 如果使用 sudo 执行 pip,您可能需要 sudo 的 -H 标志。

为什么不仔细阅读错误信息?

我需要“如何”,

你给出“为什么”,

请给别人你的帮助。

请注意,问题跟踪器主要用于错误报告,而不是一般用户支持问题。
stackoverflow.com、superuser.com 或邮件列表更适合这些问题。

大声笑我见过的最有趣的问题

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

toddrjen picture toddrjen  ·  4评论

inducer picture inducer  ·  3评论

qualiaa picture qualiaa  ·  3评论

navytux picture navytux  ·  4评论

dcsaba89 picture dcsaba89  ·  3评论