我正在尝试将我的python模块从.py转换为.pyd dll。
每次我试图推出我的安装脚本。
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [
Extension("core", ["core.py"]),
]
setup(
name = 'core',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)我知道这个错误:
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot find -lvcruntime140.dll
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1发布于 2019-10-09 18:04:07
我的问题是通过以下命令解决的:
通过cython将脚本转换为C代码的
cython -3 main.py
.c转换为.pyd dll:gcc main.c -o main.pyd -shared -IC:\Python36\include -LC:\Python36\libs -lpython36
https://stackoverflow.com/questions/58174343
复制相似问题