在Windows 7上导入Theano时出现g错误

前端之家收集整理的这篇文章主要介绍了在Windows 7上导入Theano时出现g错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
根据 the theano installation guide,我正在尝试使用正确的g安装进行设置.我之前已经让theano使用了python实现.我正在python 3.4上使用他们的git repo中最新版本的theano.我尝试过使用theano建议的TDM-GCC-64方法以及MinGW,两者都会产生完全相同的错误. (尽可能复制)
Problem occurred during compilation with the command line below:
C:\MinGW\bin\g++.exe -shared -g -march=skylake -mmmx -mno-3dnow -msse -msse2 -msse3 
-mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt 
-mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx 
-mavx2 -msse4.2 -msse4.1 -mlzcnt -mrtm -mhle -mrdrnd -mf16c -mfsgsbase 
-mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f 
-mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt 
-mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl 
-mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx 
-mno-clzero -mno-pku --param l1-cache-size=32 --param 
l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=skylake 
-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 
-IC:\Python34_64bit\lib\site-packages\numpy\core\include
IC:\Python34_64bit\include -IC:\Python34_64bit\lib\site-packages\theano\gof
-o C:\Users\Jwely\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.4-64\lazylinker_ext\lazylinker_ext.pyd 
C:\Users\Jwely\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.4-64\lazylinker_ext\mod.cpp 
-LC:\Python34_64bit\libs -LC:\Python34_64bit -lpython34


In file included from c:\mingw\include\c++\6.1.0\math.h:36:0,from C:\Python34_64bit\include/pyport.h:328,from C:\Python34_64bit\include/Python.h:50,from C:\Users\Jwely\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.4-64\lazylinker_ext\mod.cpp:1:
c:\mingw\include\c++\6.1.0\cmath:1133:11: error: '::hypot' has not been declared
    using ::hypot;
            ^~~~~

值得注意的是,在打印此错误之前,它会输出整个文件代码,你可以在这里找到整个错误输出

我不确定接下来要做什么,我已经按照指示两次,对一些依赖项使用了几种不同的安装方法,并确保在每次尝试和重新启动之间清理系统路径.

这对我有用:

>转到您的用户文件夹:C:/ Users / [username]
>创建.theanorc文件(如果尚未存在)
>确保它包含以下行:

[gcc]
cxxflags = -D_hypot=hypot
原文链接:https://www.f2er.com/windows/364900.html

猜你在找的Windows相关文章