How can I specify library versions in setup.py?

匿名 (未验证) 提交于 2019-12-03 02:50:02

问题:

In my setup.py file, I've specified a few libraries needed to run my project:

setup(     # ...     install_requires = [         'django-pipeline',         'south'     ] ) 

How can I specify required versions of these libraries?

回答1:

I'm not sure about buildout, however, for setuptools/distribute, you specify version info with the comparison operators (like ==, >=, or <=).

For example:

install_requires = ['django-pipeline==1.1.22', 'south>=0.7'] 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!