我用的是python3.6 theano, 安装了 mingw-w64-x86-64,我的操作系统是 Win10_64,安装了 cuda, 看起来一切正常
theano.test() 没问题,说明我的 gpu 正在工作,
但它一直告诉我“错误:'::hypot' 尚未声明”
C:/mingw64/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cmath:1157:11: error: '::hypot' has
not been declared\r. using ::hypot;\r. ^~~~~\r. ",
如有任何帮助,我们将不胜感激!
最佳答案
我在使用 mingw32 构建 python 文件时遇到了这个错误。
我打开了它说的文件 (C:/mingw64/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cmath:1157:11)
并将该行更改为
using ::_hypot;
或在此之前添加这一行:
#define hypot _hypot
然后问题就解决了!! 我知道这不是一个基本的解决方案,但它是我能找到的解决方案!!
关于python - '::hypot' 尚未声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42276984/