I am having an issue when trying to install Cython on Windows 7.
I have a fresh install of Python 2.7.10, open a 'cmd' window and then try to install cython using the command 'pip install cython'. It tries to build and apparently link the C-extensions but ends with the following error:
C:\Programs\mingw-w64\i686-4.9.2-posix-dwarf-rt_v4-rev2\mingw32\bin\gcc.exe -shared -s c:\users\corrin~1\appdata\local\temp\pip-build-srrbvr\cython\cython\plex\scanners.o c:\users\corrin~1\appdata\local\temp\pip-build-srrbvr\cython\cython\plex\Scanners.def -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\Cython\Plex\Scanners.pyd
C:\Python27\libs/libpython27.a: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\Programs\\mingw-w64\\i686-4.9.2-posix-dwarf-rt_v4-rev2\\mingw32\\bin\\gcc.exe' failed with exit status 1
I am using the 32-bit version of Python 2.7.10 and the 32-bit mingw-builds version of mingw-w64 (GCC 4.9.2 for i686, posix threads, dwarf exception handling, build revision 2). I have created a 'C:\Python27\Libs\distutils\distutils.cfg' file with the contents:
[build]
compiler=mingw32
I have also tried the vanilla MinGW compiler and several different version of the mingw-build compiler for GCC 4.9.2. with varying results. Of particular interest, with vanilla MinGW it skips 'libpython27.a' as incompatible and tries 'python27.lib' instead. At this point I am at a loss for what is going on or wrong here. Additionally, there doesn't seem to be any relatively current information on building Cython for windows (or for python c-extensions in general).