pypi UserWarning: Unknown distribution option: 'install_requires'

Tyler Long picture Tyler Long · Nov 28, 2011 · Viewed 118.1k times · Source

Does anybody encounter this warning when executing python setup.py install of a PyPI package?

install_requires defines what the package requires. A lot of PyPI packages have this option. How can it be an "unknown distribution option"?

Answer

Sebastian Blask picture Sebastian Blask · May 21, 2012

python setup.py uses distutils which doesn't support install_requires. setuptools does, also distribute (its successor), and pip (which uses either) do. But you actually have to use them. I.e. call setuptools through the easy_install command or pip install.

Another way is to import setup from setuptools in your setup.py, but this not standard and makes everybody wanting to use your package have to have setuptools installed.