我很努力在Windows 7 x64上安装Cython。我下载并安装了。创建一个distutils.cfg给Distutils的文件夹包含以下内容:Cython无法在Windows 7 x64上编译
[build]
compiler = mingw32
添加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
任何想法什么是错的?谢谢 !
UPDATE: 我用dlltools创建libpython27.a,然后再次尝试构建Cython,它只是工作正常! 但现在,调用cython.exe提供了这样的错误:
ImportError: DLL load failed, %1 is not a valid Win32-executable.
我想这是因为我使用Pythonx64但MINGW32编译器? 那么,我怎样才能编译它为X64?
@lance你改变了什么? //标题。 –
标题。您可以通过点击上面我的头像上方的“编辑”一词后面直接出现的“X mins ago”文本来查看修订修改摘要。 – lance
太棒了,不知道xD谢谢 –