How to use setup.py to install dependencies only?

7.8k views Asked by At

I am not interested in installing my package itself but I am interested installing all the dependencies used by my package. Is there a way to do this using setup.py? It seems setup.py installs my package and all dependencies.

3

There are 3 answers

4
Nicolas Appriou On BEST ANSWER

Use the -e flag on pip install

pip install -e .
6
Ken Williams On

The only way I've found to reliably do this in a straightforward manner is this:

pip install . && pip uninstall `python setup.py --name`
1
Charlie Parker On

if you wan to do it from setup.py do:

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

all of this ran from the project folder usually for me it's the root of my github where setup.py is.

credits: https://stackoverflow.com/a/53251585/1601580