我正在尝试通过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'
我不知道从这里开始最好的处理方式是什么。我想要完全卸载numpy然后重新安装。
sudo pip uninstall numpy
。但是在安装时,您应该真正使用 virtualenv。 - ganduGsudo pip unintsall numpy
。 - sberrynumpy
已经通过apt-get install python-numpy
安装了,如果是这种情况,你可能想要通过该途径卸载它。 - Eric