-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extra-index-url doesn't work as suggested in "Using TestPyPI" guide #7486
Comments
I've seen the same issue. Ubuntu 19.04, python 3.7.3, pip 18.1 |
Would you mind posting the output of |
Here's -vv output. It says " 2 location(s) to search for versions of pycairo:" and lists test.pypi and pypi; but then it looks in test.pypi and errors out without looking in the second place.
|
This looks very much like #6373. This HTTPError case should be caught if it originated from pip’s vendored The problem here is Ubuntu messed up when de-bundling pip’s vendored dependencies. I don’t think there’s much pip can do at this time. Relevant Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1833229 |
One thing we probably can do is to raise/catch our own HTTP exceptions instead of |
I'm hitting this today in AWS EC2 Ubuntu images. Do we know whether there are certain versions of Ubuntu this affects or doesn't affect? Trying to figure out a workaround. |
@kenahoo You would likely have better luck asking on an Ubuntu bug tracker or forum instead, where people have much better understanding to Ubuntu internals. |
I've a workaround for ubuntu18.04, might work for someone else:
If you follow the discussion on the ubuntu bug report ref'd above you'll find that repo I added. |
From my tests this seems to be broken on pip versions 20.3 and higher. If I install version of pip from 20.2.4 or lower it works correctly. I've tried 20.2.4, 20.2.3 and those work. I'm able to replicate in a python:3.8-buster docker container. However it appears to only fail when you have a requirements file with the primary index specified in the file and the extra index url specified on the command line.
|
@tl24 The situation is explained very well here: #9484 (comment) To put the situation another way, neither behaviour is broken. Which index is chosen is literally a toss-up, and pip <20.3 gives the behaviour you want because you’re lucky, not because you’re doing the right thing. |
Any update on this one folks? I just hit it. Thanks! |
Environment
Description
I'm trying to test dependencies for my package in TestPyPI before uploading to "real" PyPI. The guide at:
https://packaging.python.org/guides/using-testpypi/
says I can do this with:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple your-package
So after uploading to TestPyPI with twine, I create a new virtualenv, activate it, pip install wheel, then:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pytopo==1.6.1
This fails with:
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://test.pypi.org/simple/pycairo/
Which dependency it fails on varies; it's not always pycairo, but the rest of the message is always the same. Note that it's looking for dependencies in test.pypi.org, not pypi.org. If I just pip install pycairo (or whatever other dependency it fails on), that always works, so the packages are in pypi though not in test.pypi.
Expected behavior
Based on the "Using TestPyPI" guide and the pip man page, I expected that this would look for pytopo version 1.6.1 in TestPyPI, find it, try to satisfy its dependencies, and when the dependencies weren't found in TestPyPI it would look for them in PyPI, install them all then proceed to install pytopo from TestPyPI.
How to Reproduce
Output
The text was updated successfully, but these errors were encountered: