2016-04-21 393 views
8

我正試圖卸載OS X 10.10.5上的numpy無法在Mac上卸載Numpy

這是我到目前爲止已經試過:

brew卸載:

brew uninstall numpy 
Error: No such keg: /usr/local/Cellar/numpy 

pip卸載:

sudo pip uninstall numpy 
Cannot uninstall requirement numpy, not installed 

以下Python庫目錄沒有Numpy文件:

/usr/local/lib/python2.7/site-packages/ 
/Library/Python/2.7/site-packages/ 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/ 

打印包路徑並沒有給實際路徑:

In [1]: import numpy; numpy.__path__ 
In [2]: numpy.__path__ 
Out[2]: ['numpy'] 
In [3]: numpy.__file__ 
Out[3]: 'numpy/__init__.pyc' 

安裝的numpy的版本是1.8.0rc1,我不使用的虛擬環境。

+0

給我看幾個輸出: $ which python; $ echo $ PYTHONPATH; $ ls -l dir_where_you_ran_ipython – Hun

回答

0

刪除目錄/private/tmp/numpy解決了它。

1

你可以嘗試以下方法:

$ sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy/ 
$ sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy-*.egg* 
$ sudo rm -rf /usr/local/bin/f2py 

如果您想驗證您的包,你可以嘗試這樣的事:

>>> import site; site.getsitepackages() 
['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'] 

那麼你可以嘗試,當你知道去除包裝的精確位置,例如,如果您正在尋找您的燒瓶安裝:

$ grep -R flask*.* /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages 
+0

謝謝你的回答,我已經嘗試刪除庫文件,如你所描述的,但它沒有幫助。 – Forge