我正在遵循without setup.py文档中的pip-tools文档中的https://github.com/jazzband/pip-tools#without-setuppy示例
我所做的就是我把这个作为我的requirements.in
# To update requirements.txt, run:
#
# pip-compile requirements.in
#
# To install in localhost, run:
#
# pip-sync requirements.txt
#
django==3.2.5 # https://www.djangoproject.com/
psycopg2-binary==2.8.6 # https://github.com/psycopg/psycopg2然后我就把这个作为刺激要求。
# To update prod-requirements.txt, run:
#
# pip-compile prod-requirements.in
#
# To install in prod, run:
#
# pip-sync requirements.txt prod-requirements.txt
#
-c requirements.txt
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn在我经营的生产中
$ pip-sync requirements.txt prod-requirements.txt我的问题是如何执行最低版本的python?我只想设置小型python版本。这意味着我想要一种方法来连接python3.8,例如。
我能用小工具做这个吗?我需要选择setup.py方法吗?
我更喜欢使用requirements.in方法,因为我最熟悉它
发布于 2022-01-29 14:51:28
据我所知,您不能通过requirements.txt file对Python解释器的版本指定约束。
其他工具允许在Python解释器上指定版本说明符。
例如,通过Requires-Python packaging core metadata field,它得到了我所知道的所有Python打包构建后端的支持,包括 via its python_requires parameter,还有、、、等等。其中一些依赖于(新的) standard and its requires-python field。
您还可以查看,如果您对真正的“打包”应用程序不感兴趣,这可能会很好(也就是说,您不打算构建一个轮子并将其上传到包索引服务器(如PyPI) )。
https://stackoverflow.com/questions/68486255
复制相似问题