我正在尝试将一些 Python / Numpy 代码编译到 Cython 中以加快速度。我可以在我的桌面上很好地编译 - 我将我的 .pyx Cython 文件复制到我的笔记本电脑上运行它,在尝试编译后,我收到以下错误:
C:\Python27\MATH7450>python setup.py build_ext --inplace
running build_ext
cythoning heat.pyx to heat.c
building 'heat' extension
C:\strawberry\c\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\lib\site-pa
ckages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c heat.c -o bu
ild\temp.win32-2.7\Release\heat.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
我正在运行 Windows 7 64 位。我看到它使用的是草莓 perl。我安装了 32 位版本的草莓 perl。同样,它在我的台式机上运行良好,但在移植到笔记本电脑时出现这个奇怪的错误。