Reputation: 12228
I have a package in a private repo (blob storage) that has an install_requires
from pypi repo. I am running pip as follows
pip install --upgrade mypackage -i https://example.com/ --extra-index-url https://pypi.org/simple/
but it fails with the following error
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/mypackage/
the verbose output is (I've deleted some lines)
Looking in indexes: https://example.com/, https://pypi.org/simple/
2 location(s) to search for versions of mypackage:
* https://example.com/mypackage/
* https://pypi.org/simple/mypackage/
Starting new HTTPS connection (1): example.com:443
https://example.com:443 "GET /mypackage/ HTTP/1.1" 304 0
Analyzing links from page https://example.com/mypackage/
Found link https://example.com/mypackage/mypackage-0.0.1-py3-none-any.whl (from https://example.com/mypackage/), version: 0.0.1
Found link https://example.com/mypackage/mypackage-0.0.1.tar.gz (from https://example.com/mypackage/), version: 0.0.1
Getting page https://pypi.org/simple/mypackage/
Looking up "https://pypi.org/simple/mypackage/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/mypackage/ HTTP/1.1" 404 13
Status code 404 not in [200, 203, 300, 301]
So it finds my package, and then ignores it.
(I'm kinda new to python / pip so I may be doing something stupid)
I am running this on ubuntu 19.04 using these versions
(env) ubuntu@ubuntu19:~/staged/packages$ pip --version
pip 18.1 from /home/ubuntu/staged/packages/env/lib/python3.7/site-packages/pip (python 3.7)
(env) ubuntu@ubuntu19:~/staged/packages$ python3 --version
Python 3.7.3
Upvotes: 3
Views: 5715
Reputation: 962
There is a difference between --extra-index-url
and --index-url
. The first one searches through several urls and, depending on versions, it appears to have some problems recovering from errors as can be found here
Solution would be indicating that your repo is the only one where to search for your package with --index-url=https://example.com/mypackage/
or in your case try to check that your are executing latest pip version trying to upgrade with pip install -U pip
.
Upvotes: 2