I am trying to understand that I have a c-compiler in MinGW 32-bit, and I tried everything I can find on the Internet, but it still does not work. I am using the 64-bit version of Windows 7 Professional. Here is what I tried:
(1) I have Python 2.7, and I just installed MinGW with the gcc and g ++ options and some other options
(2) I edited the PATH environment variable, so it included
C:\MinGW\bin;C:\MinGW\MSYS\1.0\local\bin;C:\MinGW\MSYS\1.0\bin
(3) I told Python to use MinGW as the default compiler by creating a file called
C: \ Python27 \ Lib \ distutils \ distutils.cfg containing
[build] compiler = mingw32
(By the way, I have MinGW32)
(4) I deleted all instances of -mno-cygwin from C: \ Python27 \ Lib \ distutils \ cygwincompiler.py
(5) I have a setup.py file and a module called trycython.pyx written in python. My setup.py says from setting import distutils.core import from distutils.extension import Extension from Cython.Distutils import build_ext
setup( cmdclass = {'build_ext':build_ext}, ext_modules=[Extension("tryingcython",["tryingcython.pyx"])] )
So, I open the command line and get into the directory containing setup.py and trycython.pyx, and I print python setup.py build_ext --inplace --compiler = mingw32
Then he tells me:
running build_ext skipping 'tryingcython.c' Cython extension (up-to-date) building 'tryingcython.c' extension gcc -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c tryingcython.c -o build\ temp.win32-2.7\Release\tryingcython.o error: command 'gcc' failed: No such file or directory
So, I think Cython cannot say that I have gcc, and it cannot find it or that, although I have tried all the tips that I can find on the Internet to understand that I have MinGW, which is Enabled by gcc . Any help / additional ideas on how I can make it really work on the cython will be greatly appreciated.