gpt4 book ai didi

python - 如何使用 setuptools 指定 python 版本?

转载 作者:太空狗 更新时间:2023-10-29 22:12:45 25 4
gpt4 key购买 nike

<分区>

有没有办法指定要与 setup.py 中定义的 python 包一起使用的 python 版本?

我的 setup.py 目前看起来像这样:

from distutils.core import setup
setup(
name = 'macroetym',
packages = ['macroetym'], # this must be the same as the name above
version = '0.1',
description = 'A tool for macro-etymological textual analysis.',
author = 'Jonathan Reeve',
author_email = 'jon.reeve@gmail.com',
url = 'https://github.com/JonathanReeve/macro-etym',

download_url = 'https://github.com/JonathanReeve/macro-etym/tarball/0.1', # FIXME: make a git tag and confirm that this link works
install_requires = ['Click', 'nltk', 'pycountry', 'pandas',
'matplotlib'],
include_package_data = True,
package_data = {'macroetym': ['etymwm-smaller.tsv']},
keywords = ['nlp', 'text-analysis', 'etymology'],
classifiers = [],
entry_points='''
[console_scripts]
macroetym = macroetym.main:cli
''',
)

这是一个命令行程序。我的脚本使用 Python 3 运行,但许多操作系统仍然默认使用 Python 2。如何指定要在此处使用的 python 版本?我似乎无法在 the docs 中找到任何内容,但也许我没有找对地方?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com