1. 程式人生 > >python 安裝numpy遇到無法卸載的解決辦法

python 安裝numpy遇到無法卸載的解決辦法

比較 更新失敗 mac frame www not and all works

python 安裝模塊numpy遇到無法卸載的情況的解決辦法

python在安裝seaborn的時候,需要更新numpy模塊,但是更新失敗,輸出下面的錯誤:


  Cannot uninstall ‘numpy‘. It is a distutils installed project and thus we ca

查了一下,有的網友說可以關閉Mac的SIP,但是由於操作系統版本較低,沒能奏效。

最終使用的解決辦法比較簡單。

執行

  site.getsitepackages()

輸出

  [‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python‘, ‘/Library/Python/2.7/site-packages‘]

把涉及到的numpy文件夾都刪掉,再次執行

  pip install numpy

安裝成功

  Installing collected packages: numpy
  Successfully installed numpy-1.15.1


原文:http://www.vmfor.com/p/101820499405.html

python 安裝numpy遇到無法卸載的解決辦法