其他分享
首页 > 其他分享> > 安装pylearn2 时,报错:error: '::hypot' has not been declared. using ::hypot;.

安装pylearn2 时,报错:error: '::hypot' has not been declared. using ::hypot;.

作者:互联网

Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    from theano.compat.six.moves import input
  File "D:\anacon\envs\python27\lib\site-packages\theano\__init__.py", line 55, in <module>
    from theano.compile import \
  File "D:\anacon\envs\python27\lib\site-packages\theano\compile\__init__.py", line 9, in <module>
    from theano.compile.function_module import *
  File "D:\anacon\envs\python27\lib\site-packages\theano\compile\function_module.py", line 18, in <module>
    import theano.compile.mode
  File "D:\anacon\envs\python27\lib\site-packages\theano\compile\mode.py", line 11, in <module>
    import theano.gof.vm
  File "D:\anacon\envs\python27\lib\site-packages\theano\gof\vm.py", line 568, in <module>
    import lazylinker_c
  File "D:\anacon\envs\python27\lib\site-packages\theano\gof\lazylinker_c.py", line 116, in <module>
    preargs=args)
  File "D:\anacon\envs\python27\lib\site-packages\theano\gof\cmodule.py", line 2010, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/math.h:36,.
                  from D:\anacon\envs\python27\include/pyport.h:325,.                  from D:\anacon\envs\python27\include/Python.h:61,.
                  from C:\Users\zx305\AppData\Local\Theano\compiledir_Windows-10-10.0.17763-Intel64_Family_6_Model_158_Stepping_9_GenuineIntel-2.7.15-64\lazylinker_ext\mod.cpp:1:. C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cmath:1121:11: error: '::hypot' has not been declared.
    using ::hypot;.

尝试安装另一个版本的minGW,依旧存在这个问题

尝试下图这个方法,来自链接https://stackoverflow.com/questions/42276984/hypot-has-not-been-declared

it works!

标签:declared,lib,envs,py,hypot,报错,python27,theano,anacon
来源: https://blog.csdn.net/qq_37148940/article/details/104693295