错误 运行 theano:LONG_BIT 定义对于平台来说似乎是错误的(错误的 gcc/glibc 配置?)

Error running theano: LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)

我按照 https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13973/a-few-tips-to-install-theano-on-windows-64-bits/87880 上的说明(使用 OpenBLAS)在 64 位 Windows 7.

上使用 Python 3.4 安装 Theano

Theano 似乎安装没有错误,但是当我尝试 运行 一个测试程序(或者只是 python 中的 "import theano")时,我得到一个错误,其核心似乎是是:

In file included from C:\SciSoft\Anaconda3\include/Python.h:50:0,
             from C:\Users\Owner\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-3.4.3-64\lazylinker_ext\mod.cpp:1:
C:\SciSoft\Anaconda3\include/pyport.h:814:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

我如何 "configure" gcc/glibc 正确?

我查看了有关此错误的其他几个问题,但没有找到解决方案。

此错误消息强烈指示将 Theano 与 Cygwin 一起使用。解决方案是改用 MinGW。如果两者都已安装,请确保 MinGW 在 PATH 环境变量中出现在 Cygwin 之前。

conda install theano 就是您现在需要做的。

检查是否安装了 gcc first.If 不确定是否安装了它。

如果 gcc 已经存在并且仍然面临这个问题,请确保您为 Theano 和 Python 使用了正确的位,例如您的情况下的 64 位。 在我的例子中,我在 64 位 OS 上安装了 32 位 anaconda python,这导致了这个问题。重新安装正确的版本修复它。