我也有同样的问题。一旦我将numpy从1.15.4升级到1.16.1,它就会受到欢迎。
如果您使用的是pip: pip install numpy --upgrade
Anaconda3随附的Numpy版本为1.15.4。所以我升级了,它起作用了。
旁注:如果您还在脚本中使用scikit-image ,请注意numpy 1.16.3与旧版本的scikit-image有冲突(例如,您可能会得到ImportError: cannot import name '_validate_lengths'
)。在这种情况下,从终端pip install --upgrade scikit-image
为我解决了这个问题。
希望能帮助到你!!
0
我已经安装了Ancaconda3和Tensorflow。当我尝试在python shell中导入Tensorflow时,出现以下错误:
我不确定是什么问题,因为numpy已安装在我的系统上,并且可以在python中成功导入。我正在使用Windows10。
提前致谢。