TestPyPI: "ERROR: No matching distribution found for setuptools" for PEP517-style packaging (with pyproject.toml)
See original GitHub issueI would like to forward this report of a problem related to the TestPyPI infrastructure: pypa/pip#9242
PEP517-style package installation via the TestPyPI infrastructure fails because (the wording might be wrong) TestPyPI does not serve setuptools that is required to build the package under isolation.
TestPyPI is advertised by popular tutorials used by packaging newbs. So I guess it’d be good if this is fixed or at least the beginners get some guidance on this issue.
Note that the same package installed through the real PyPI does not show this problem.
@uranusjr suggested a workaround:
If you need to test the installation right now, the easiest fix available without involving others would be to serve your own setuptools copy instead. Something like
pip wheel setuptools wheel -w ./wheels
pip install --find-links ./wheels --index-url https://test.pypi.org/simple ...
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
--extra-index-url
is deterministic. The issue is it’s not what people think it is 🙂It is viable to use
--extra-index-url
for this, but not pointing it to pypi.org.It is not a good idea to use
--extra-index-url=https://pypi.org/simple
here because the search results of--index-url
and--extra-index-url
are merged, not first-found-first-win. So if pypi.org has a package 2.1 while test.pypi.org has only package 2.0, package 2.1 from PyPI will be chosen over package 2.0 on TestPyPI. This is usually not the behaviour you’re looking for when using TestPyPI.