Setuptools install fails with PEP508 URLs
See original GitHub issuesetuptools v 45.1.0 pip v 20.0.2
Running python setup.py install
for a setup.py which includes PEP508 format URLs in the install_requires
field results in failure.
for example if keras @ https://github.com/MarcBS/keras/archive/master.zip
is in the install_requires
field then setuptools fails to find it, and looks on PyPI instead, installing a matching package (in this case ‘keras’).
However, running pip install .
for the same setup.py
succeeds, similarly with pip install keras @ https://github.com/MarcBS/keras/archive/master.zip
.
If setuptools always uses pip to install dependencies, then why does it fail for PEP508 URL dependencies when pip is able to do this?
In summary:
pip install .
works ✔️pip install 'keras @ https://github.com/MarcBS/keras/archive/master.zip'
works ✔️python setup.py install
fails ❌
(further to this, PyPI throws an error when uploading a package with a setup.py containing PEP 508 dependency links)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top GitHub Comments
Our policy to date has been that if using
pip install
fixes your problem, you should usepip install
and we won’t fix the issue.Direct invocations of
setup.py install
are not the right thing to do, despite the fact that there is a lot of misleading documentation out there indicating that it is.We to need to work out a plan for actively deprecating and then removing
setup.py install
to try to get the word out, though.If someone wants to try to figure out why this is happening, feel free, but it’s not clear that we would be willing to accept a PR fixing it if it comes with any additional maintenance burden.
hmm, that is an interesting position, given that for many of us
python setup.py install
is muscle memory and our fingers type it without thinking.If
pip install
is the only supported route now, can that policy be documented somewhere?Does that also apply to
pip wheel
versuspython setup.py bdist wheel
too?