1. 程式人生 > >安裝theano時候發現報錯:cannot install ''numpy'.It is a distutils installed project and thus we cannot ...

安裝theano時候發現報錯:cannot install ''numpy'.It is a distutils installed project and thus we cannot ...

發現我安裝theano的時候需要numpy需要1.9以上版本,而我之前自帶的numpy是1.8版本,所以版本有問題。根本原因是theano需要的numpy版本不符合要求,但是numpy已經安裝過了,所以無法進行直接解除安裝。提供兩個解決方法:

解決方法1:直接找到numpy的安裝目錄,直接通過sudo rm 去對資料夾進行刪除。(如果找不到資料夾,可以通過下面截圖方式,一般都在dist-packages目錄下)


方法2:(強行安裝更新更高的版本)

sudo pip install numpy --ignore-installed numpy