使用pip卸载numpy时权限被拒绝

okc*_*hip 8 python numpy

我试图通过Pip卸载Numpy,但出现此错误:

$ pip uninstall numpy

Uninstalling numpy:
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.6.2-py2.7.egg-info
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/uninstall.py", line 54, in run
    requirement_set.uninstall(auto_confirm=options.yes)
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 899, in uninstall
    req.uninstall(auto_confirm=auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 495, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1518, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 293, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    os.unlink(src)
 OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.6.2-py2.7.egg-info'
Run Code Online (Sandbox Code Playgroud)

不知道从这里开始的最佳方式是什么.我想完全卸载numpy然后重新安装.

Fra*_*aro 4

尝试:

sudo pip uninstall numpy
Run Code Online (Sandbox Code Playgroud)

或者,如果它不起作用:

sudo apt-get remove python-numpy
Run Code Online (Sandbox Code Playgroud)