Nik*_*s R 7 python 64-bit mingw cython windows-7
我正在努力在Windows 7 x64上安装Cython.我下载并安装了automated MinGW installer
.使用以下内容为distutils文件夹创建了distutils.cfg:
[build]
compiler = mingw32
Run Code Online (Sandbox Code Playgroud)
添加C:\MinGW\bin
到环境变量后,我调用了easy_install Cython
但是我收到以下错误.翻阅互联网真的没有给我有用的结果,因为所有这些编译的东西(或者我应该说sh*t?)对我来说是如此新鲜.
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5d59): undefined reference to `_imp__PyObject_GetAttr'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5dc5): undefined reference to `_imp__PyObject_GetAttr'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5e31): undefined reference to `_imp__PyObject_GetAttr'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5ebc): undefined reference to `_imp__PyObject_Call'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5f08): undefined reference to `_imp__PyDict_New'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5f49): undefined reference to `_imp__PyObject_SetAttr'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x5ffe): undefined reference to `_imp__PyErr_Occurred'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x6013): undefined reference to `_imp__PyExc_ImportError'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x601e): undefined reference to `_imp__PyErr_SetString'
c:\users\niklas\appdata\local\temp\easy_install-dgjjub\cython-0.15\cython\plex\scanners.o:Scanners.c:(.text+0x602d): undefined reference to `_imp__PyInt_FromLong'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
error: Setup script exited with error: command 'dllwrap' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
任何想法都错了吗?谢谢 !
更新:我使用dlltools创建libpython27.a然后再次尝试构建Cython,它只是工作正常!但现在,调用cython.exe会传递此错误:
ImportError: DLL load failed, %1 is not a valid Win32-executable.
Run Code Online (Sandbox Code Playgroud)
我假设这是因为我使用Pythonx64但MinGW32编译器?那么,我怎样才能为x64编译它?