1.先上代码
from setuptools import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize(["V4.py"]))
V4 是你需要转换的py 文件。。
2. error Microsoft V C++ 14.0 needed.
不出以外没有VC ++环境的会报错。试了网上各种 安装 一下文件的,提示安装包损坏
本人只装了Visual Studio 2019, 只有 python 和 C# 环境~,无奈重新装了VS, 包含了C++环境之后。
不再报错啦!
3. cmd 执行代码
python python2c.py build_ext
会生成build 文件,以及下面的文件~~