How to specify dependencies when creating the setup.py file for a python package

淺唱寂寞╮ 提交于 2019-11-30 11:17:54

Ignore distutils. If you want to create a package that specifies dependencies for a tool like pip to go out and find for you, you need to base your setup.py of off setuptools instead.

setuptools dependencies are listed in install_requires, which takes a list:

setup(name='MyStuff',
      version='1.0',
      install_requires=['progressbar'],
      # ...
)

which should be distributions of their own. os and sys are modules included with Python and should not be listed.

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