setup.py: restrict the allowable version of the python interpreter

后端 未结 3 429
滥情空心
滥情空心 2020-11-30 08:29

I have a Python library. Unfortunately I have not updated it to work with Python 3 yet.

In its setup.py, I added

install_requires=[\'pytho         


        
3条回答
  •  我在风中等你
    2020-11-30 09:09

    As of version 9.0.1 pip will honor a new python_requires string, specifying the python version required for installation, eg:

    setup(
        ...,
        python_requires=">=3.3"
    )
    

    See here for more details. See also this answer on SO.

提交回复
热议问题