pipenv 在 pipfile 中指定 python 的最低版本? [英] pipenv specify minimum version of python in pipfile?

查看:219
本文介绍了pipenv 在 pipfile 中指定 python 的最低版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pipenv 有没有办法在 Pipfile 中指定 python 的最低版本?

Is there a way in pipenv to specify the minimum version of python in the Pipfile?

这样的东西会起作用吗?

Would something like this work?

[requires]
python_version = ">=python 3.5"

推荐答案

不,pipenv支持这个.根据 pipenv issue 1050 功能请求pipenv 作者已经明确选择不实施它.

No, pipenv does not support this. Per pipenv issue 1050 feature request, the pipenv authors have explicitly chosen not to implement it.

请注意,您可以指定:

 python_version = "3"

允许任何版本的 Python 3.不完全符合您的要求,但对于某些项目来说可能就足够了.

to allow any version of Python 3. Not exactly what you asked for, but it might be sufficient for some projects.

这篇关于pipenv 在 pipfile 中指定 python 的最低版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆