3

I always thought you can install a python package by

  1. Checking out the code (e.g. git clone ...)
  2. cd into that folder
  3. Run pip install .

But now I read that you need to run

python setup.py install

to install all dependencies defined in install_requires in setup.py (see HERE).

Can someone please explain the differences? And why pip install ignores the package list in install_requires? Or am I doing something completely wrong?

Alex
  • 41,580
  • 88
  • 260
  • 469
  • 2
    It would be similar to your question: https://stackoverflow.com/a/15731459/11922177 – DrakeLiam May 11 '22 at 06:08
  • 1
    Wow, but this answer tells me the opposite of how things are. `pip install` seems to ignore `install_requires` while `setup.py` does not. The answer given in the other place confuses me even more. The answer does not make any sense – Alex May 11 '22 at 06:12
  • Does this answer your question? [Difference between 'python setup.py install' and 'pip install'](https://stackoverflow.com/questions/15724093/difference-between-python-setup-py-install-and-pip-install) – Nuno André Feb 16 '23 at 19:13
  • thanks,you remind me that `pip install . -i index-url` could be work in internal source and seem effect equal to `python setup.py install` – Cherrymelon Jun 13 '23 at 09:43

0 Answers0