Can pip install from setup.cfg, as if installing from a requirements file?

According to the setuptools documentation, setuptools version 30.3.0 (December 8, 2016) “allows using configuration files (usually setup.cfg) to define package’s metadata and other options which are normally supplied to setup() function”. Similar to running pip install -r requirements.txt to install Python packages from a requirements file, is there a way to ask pip to install the packages listed in the install_requires option of a setup.cfg configuration file?

Answer

No, pip does not currently have facilities for parsing requirements from setup.cfg. It will only install dependencies along with the main package(s) provided in setup.py.

Leave a Reply

Your email address will not be published. Required fields are marked *