下载报错及无法卸载numpy的问题?

ImportError: numpy.core.multiarray failed to import

应该是numpy安装出错了,所以执行pip uninstall numpy,也无法成功卸载了,然后重新pip install numpy发现还是不行,会报错:

Found existing installation: numpy 1.7.1

 

 

这个1.7.1应该就是上面说的骚操作的结果。后面尝试了什么pip install -U numpy会报错:

Found existing installation: numpy 1.7.1
ERROR: Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

或者尝试:pip install --ignore-installed numpy,可以正常安装numpy;

但是在import numpy的时候会报错:

 

 

还是版本问题,最后孤注一掷的解决办法,找到python包的位置,例如centos是/usr/lib64/python2.7/site-packages/下,虽然前面卸载了numpy,进入文件夹后还是能发现numpy文件夹的出现,然后使用rm -rf numpy删除看到的numpy相关文件,

然后再次重新安装numpy,此时恢复正常了!!!

 

posted @   Mr_胡萝卜须  阅读(1386)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示