3

I followed the directions on https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13973/a-few-tips-to-install-theano-on-windows-64-bits/87880 (with OpenBLAS) to install Theano with Python 3.4, on 64-bit Windows 7.

Theano seemed to install without error, but when I try to run a test program (or just "import theano" in python) I get an error the core of which seems to be:

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?)."

How do I "configure" gcc/glibc correctly?

I looked at several other questions on this error but haven't found a solution.

Community
  • 1
  • 1
holdenlee
  • 969
  • 1
  • 8
  • 21
  • After installing Anaconda, did you execute `conda install mingw libpython`? And do you have any other C++ compilers installed, other than MinGW? – Daniel Renshaw Aug 23 '15 at 20:57
  • (1) Yes. (2) I had TDM-GCC-64, which I just uninstalled, but it still doesn't work. – holdenlee Aug 23 '15 at 22:17
  • 1
    Do you have more than one installation of Python? Are you certain you're not accidentally using Cygwin instead of MinGW (e.g. via PATH order issue)? Theano won't work with Cygwin on WIndows. – Daniel Renshaw Aug 24 '15 at 10:33
  • 1
    Cygwin was the problem. It works now! (Why doesn't theano work with Cygwin?) – holdenlee Aug 24 '15 at 15:34

3 Answers3

4

This error message is strongly indicative of using Theano with Cygwin. The solution is to use MinGW instead. If you have both installed then make sure MinGW appears before Cygwin in the PATH environment variable.

Daniel Renshaw
  • 33,729
  • 8
  • 75
  • 94
0

conda install theano is all you need to do now.

Ray Donnelly
  • 3,920
  • 1
  • 19
  • 20
0

Check if gcc is installed first.If not make sure you install it.

If gcc already exists abd still facing the issue, make sure you are using the right bits for Theano and Python, like 64-bit in your case. In my case I installed 32-bit anaconda python on 64-bit OS which caused the issue. re-installing the right version fixed it.

spark_dream
  • 326
  • 2
  • 8
  • 23