PyPi packages as dependency requirements in setup.py
If you are creating a setup.py for your Python project, you might have a requires property, like:
requires = [ 'some-pypi-package' ]
Trouble is, requires is designed for Python module dependencies, not installation dependencies. And with the dashes in the PyPi package name, you get the very unhelpful error:
ValueError: expected parenthesized list
The fix is to use install_requires, which supports PyPi packages as dependencies:
install_requires = [ 'some-pypi-package' ]
Written by Scott Bradley
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dependencies
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#