PIP: Installing only the dependencies

To install your project's dependencies (i.e. install_requires + extra_requires) you have to extract your dependencies using setuptools egg-info and then install the filtered list of the combined dependencies:

python setup.py egg_info
pip install `grep -v '^\[' *.egg-info/requires.txt`

In my package root issuing pip install -e . installs dependencies.


If your dependencies are defined in the setup.py file, you can first dump them to an external file using:

python setup.py egg_info

This will list all your dependencies in YOUR_PROJECT.egg-info/requires.txt file. Then you can install them using pip:

pip install -r *.egg-info/requires.txt

to delete what you just created:

rm -rf *.egg-info/

to save some time copy pasting:

python setup.py egg_info
pip install -r *.egg-info/requires.txt
rm -rf *.egg-info/