numpy版本问题

importerror: Something is wrong with the numpy installation. While importing we detected an older version of numpy in [‘D:\Anaconda3\envs\tensorflow\lib\site-packages\numpy’]. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

Python3的numpy更新可能会出现问题!!

不说废话,直接看报错信息(Import Error):

错误信息描述

ImportError: Something is wrong with the numpy installation. 
While importing we detected an older version of numpy in 
['D:\\Anaconda3\\envs\\tensorflow\\lib\\site-packages\\numpy']. 
One method of fixing this is to repeatedly uninstall numpy 
		until none is found, then reinstall this version.

出现这个报错说明在你安装新的软件,或者更新numpy或者干什么的时候,旧的numpy没有卸载掉,两版numpy导致出现冲突。一般这种情况下还会伴随有另一个报错:

UserWarning: loaded more than 1 DLL from .libs

进到信息中指定的.libs文件夹中会发现,确实是多了一个DLL文件,注意,这两个文件有一个你有权限删除,但是另一个你不能删除,因为python正在占用。

解决方案

我是在anaconda里卸载安装的,激活了tensorflow环境,最后提示了Skipping numpy as it is not installed.才继续下载安装的

如报错信息所说

  • 先卸载numpy: pip uninstall numpy
  • 再卸载numpy,直到卸载到提示信息显示,此时完全已经没有numpy了为止,提示了Skipping numpy as it is not installed.
  • 下载numpy:pip install numpy
  • 此时应该可用;
  • 此时若numpy不可用,查看.libs文件夹,删除掉其中的另一个dll文件,应该可用

参考原文:https://blog.csdn.net/qq_38228254/article/details/88880189

你可能感兴趣的:(TensorFlow,Python)