要使用bdist_wheel
创建特定版本的轮子,可以在setup.py
文件中指定python_requires
参数。以下是一个示例:
from setuptools import setup
setup(
# 其他参数...
python_requires='>=3.6, <3.7',
# 其他参数...
)
在python_requires
参数中,我们指定了需要的Python版本范围为大于等于3.6,小于3.7。这样在使用bdist_wheel
命令创建轮子时,只会适配指定版本范围内的Python。
执行bdist_wheel
命令:
python setup.py bdist_wheel
这样就能创建出适用于Python 3.6的轮子了。
上一篇:BDH公式不接收外部变量。
下一篇:bdp数据分析