安装theano时候发现报错:cannot install ''numpy'.It is a distutils installed project and thus we cannot ...

时间:2023-03-09 18:45:15
安装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

---------------------
作者:lucas-nlp
来源:CSDN
原文:https://blog.csdn.net/qq_31747765/article/details/80303366
版权声明:本文为博主原创文章,转载请附上博文链接!