Windows 里面的 .pyd 是类似 .so .dll 动态链接库的一种 Python 文件) 软件和环境Win10 x64Python 3.8.10 x86Cythonpy2sec.pyVS_2019_Community) 安装 Python 3.8.10 x86Python 3.8.10 32位 点击下载其它 Python 版本 点击查看注意:我现在只用到的是 32位 , 所以下载32位 的版本, 当然 最后编译出来的 .pyd 也是32位的 ) 安装 Cythonpip install cython) 下载 py2sec点击 到 github 下载我的备份下载(可能不是最新)python py2sec.py -f test.py -r # 生成 test.pyd 之后 模块名为 test 不能改名, 调用时,有错误弹出, 编译之前改好 test.py 的名称 ) 安装 VS_2019_Community不安装VS可以开始编译, 但会出现 “Unable to find vcvarsall.bat”去下载 Visual Studio 2019 Community* 如果页面发生
Hawk
别固执的认为某事必须 !