解决办法:安装高版本的numpy
先卸载当前numpy,不然没法直接装高版本的:
pip uninstall numpy
再安装numpy:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
Microsoft Windows [版本 10.0.17763.1039]
(c) 2018 Microsoft Corporation。保留所有权利。
系统找不到指定的路径。
C:\Users\HuaWei>pip install numpy
Requirement already satisfied: numpy in d:\yolov3_tensorflow\python\lib\site-packages (1.15.1)
C:\Users\HuaWei>pip uninstall numpy
Found existing installation: numpy 1.15.1
Uninstalling numpy-1.15.1:
Would remove:
d:\yolov3_tensorflow\python\lib\site-packages\numpy-1.15.1.dist-info\*
d:\yolov3_tensorflow\python\lib\site-packages\numpy\*
d:\yolov3_tensorflow\python\scripts\f2py.py
Proceed (y/n)? y
Successfully uninstalled numpy-1.15.1
C:\Users\HuaWei>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/53/74/b997e4c7b4abc668e99f4c3dba87ee2c6f7559319af756cc1ede37665a8d/numpy-1.18.1-cp36-cp36m-win_amd64.whl (12.8 MB)
Installing collected packages: numpy
Successfully installed numpy-1.18.1
C:\Users\HuaWei>
然后运行程序,完美!!
20200429
记得以后跑tensorflow1.11.0得装回numpy1.15.1版本啊,别忘了!!
参考文章1:numpy报错:ValueError: numpy.ufunc size changed, may indicate binary incompatibility.
参考文章3:python wheel库(安装包查找)(适用于Python扩展程序包的非官方Windows二进制文件、Pypi官方库、清华大学开源软件镜像源)