2

I know this question is asked a lot, but I can't figure it out: I have trouble to install Cython library on my Windows 10 machine:

I have:

  • OS : Win 10, 64 bit
  • Python --version : 3.7.0b1
  • Mingw 64

I do:

  • Install Mingw 64
  • Add the path to C:\TDM-GCC-64\bin
  • I created distutils.cfg file inside PYTHON_PATH\Lib\distutils

add

 [build]
 compiler = mingw32

inside

  • Manually applying this patch
  • Manually downloading the file vcruntime140.dll(build : 14.0.23918.0) and putting it in PYTHON_PATH\libs
  • Downloaded the Cython code
  • Run the command python setup.py install

and get error:

C:\Users\Marko Z\Desktop\cython-master\Cython\Plex\Scanners.c: In function '__Pyx_ImportType':
C:\Users\Marko Z\Desktop\cython-master\Cython\Plex\Scanners.c:11981:13: warning: unknown conversion type character 'z' in format [-Wformat=]
         "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
         ^
C:\Users\Marko Z\Desktop\cython-master\Cython\Plex\Scanners.c:11981:13: 
warning: unknown conversion type character 'z' in format [-Wformat=]
C:\Users\Marko Z\Desktop\cython-master\Cython\Plex\Scanners.c:11981:13: warning: too many arguments for format [-Wformat-extra-args]
writing c:\users\marko z\desktop\cython-master\cython\plex\Scanners.cp37-win32.def
C:\TDM-GCC-64\bin\x86_64-w64-mingw32-gcc.exe -shared -s "c:\users\marko z\desktop\cython-master\cython\plex\scanners.o" "c:\users\marko z\desktop\cython-master\cython\plex\Scanners.cp37-win32.def" "-LC:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs" "-LC:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\PCbuild\win32" -lpython37 -o build\lib.win32-3.7\Cython\Plex\Scanners.cp37-win32.pyd
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs/libpython37.a when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs/python37.lib when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs\libpython37.a when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs/libpython37.a when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs/python37.lib when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\libs\python37.lib when searching for -lpython37
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython37
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\TDM-GCC-64\\bin\\x86_64-w64-mingw32-gcc.exe' failed with exit status 1

I try to follow the instruction by:

and also

(I try with patch to create object Mingw64CCompiler and then remove all instances of -mno-cygwin, but I get the same error...)

Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97

0 Answers0