Theano找不到lstdc ++

时间:2016-07-19 14:32:59

标签: python c++ g++ anaconda theano

我使用anaconda2来安装mingw和libpython,然后我通过在IDLE上导入theano来测试运行Theano,不幸的是我遇到一个错误,告诉我找不到几个文件。

我去了文件路径C:\ Anaconda2 \ MinGW \ x86_64-w64-mingw32 \ lib,我发现确实没有名为-lstdc ++的文件,但是有libstdc ++。a,libmingw32.a,libgcc_s.a其余的,只有一个我找不到的文件,那就是lgcc.a或libgcc.a。

我怀疑是我需要卸载我的Theano并重新安装Bleeding边缘版本,但我想问一下即使不安装Bleeding Edge版本也可以解决这个问题吗?或者这真的需要吗?

这是追溯:

   Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        import theano
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\__init__.py", line 70, in <module>
        from theano.compile import (
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\__init__.py", line 10, in <module>
        from theano.compile.function_module import *
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\function_module.py", line 21, in <module>
        import theano.compile.mode
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\mode.py", line 12, in <module>
        import theano.gof.vm
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\vm.py", line 654, in <module>
        from . import lazylinker_c
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\lazylinker_c.py", line 127, in <module>
        preargs=args)
      File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\cmodule.py", line 2299, in compile_str
        (status, compile_stderr.replace('\n', '. ')))
    Exception: Compilation failed (return status=1): c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Python27\libs/libpython27.a when searching for -lpython27
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libstdc++.dll.a when searching for -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libstdc++.a when searching for -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libstdc++.a when searching for -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libstdc++.dll.a when searching for -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libstdc++.a when searching for -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lstdc++
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0\libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libadvapi32.a when searching for -ladvapi32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ladvapi32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libshell32.a when searching for -lshell32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lshell32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libuser32.a when searching for -luser32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -luser32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libkernel32.a when searching for -lkernel32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lkernel32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_s
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0\libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a when searching for -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingwex
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
    . c:/anaconda2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcrt
    . collect2.exe: error: ld returned 1 exit status

在32位窗口上重新安装Anaconda后,我遇到了错误:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import theano
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\__init__.py", line 70, in <module>
    from theano.compile import (
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\function_module.py", line 21, in <module>
    import theano.compile.mode
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\compile\mode.py", line 12, in <module>
    import theano.gof.vm
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\vm.py", line 654, in <module>
    from . import lazylinker_c
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\lazylinker_c.py", line 127, in <module>
    preargs=args)
  File "C:\Python27\lib\site-packages\theano-0.9.0.dev2-py2.7.egg\theano\gof\cmodule.py", line 2299, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): C:\Python27\libs/libpython27.a(dmmes00245.o):(.idata$7+0x0): undefined reference to `__head_C__build27_cpython_PCBuild_libpython27_a'
. C:\Python27\libs/libpython27.a(dmmes00223.o):(.idata$7+0x0): undefined reference to `__head_C__build27_cpython_PCBuild_libpython27_a'
. C:\Python27\libs/libpython27.a(dmmes00054.o):(.idata$7+0x0): undefined reference to `__head_C__build27_cpython_PCBuild_libpython27_a'
. C:\Python27\libs/libpython27.a(dmmes01026.o):(.idata$7+0x0): undefined reference to `__head_C__build27_cpython_PCBuild_libpython27_a'
. C:\Python27\libs/libpython27.a(dmmes00253.o):(.idata$7+0x0): undefined reference to `__head_C__build27_cpython_PCBuild_libpython27_a'
. C:\Python27\libs/libpython27.a(dmmes00207.o):(.idata$7+0x0): more undefined references to `__head_C__build27_cpython_PCBuild_libpython27_a' follow
. collect2.exe: error: ld returned 1 exit status

2 个答案:

答案 0 :(得分:0)

给出的确切信息是:

skipping incompatible .../libstdc++.dll.a when searching for -lstdc++
etc..

我也看到它正在寻找user32kernel32,但工具链显然是为x86_64-w64-mingw32配置的。

您是否尝试使用64位工具链为32位系统编译Theano?你应该检查你的编译器标志。

答案 1 :(得分:0)

最后,在32位Windows上的Anaconda中重新安装mingw和libpython之后,一切都通过升级到最新版本来解决。我从2.7.10更新到2.7.12。

注意:不要忘记在变量环境中将Anaconda2文件夹放在PATH上。