I am trying to install a Python package that our team has stored both on the publicly accessible PyPi repository, and in a private PyPi repository. Due to security reasons, some of our computers cannot connect to the wider internet, but can see the private repository.
However, when running pip install
using pip v24.0
, and trying to do so via the private repository, the installation fails:
$ pip install --trusted-host url-to-local-repository.com:8000/pypi --index-url url-to-local-repository.com:8000/pypi --extra-index-url url-to-local-repository.com:8000/pypi package-name[optional-dependencies]
$ Looking in indexes: url-to-local-repository.com:8000/pypi, url-to-local-repository.com:8000/pypi
$ Collecting package-name[optional-dependencies]
$ ERROR: HTTP error 404 while getting url-to-local-repository.com:8000/pypi/package-name/package-name-0.0.0-py3-none-any.whl.metadata
$ ERROR: 404 Client Error: Not Found for url-to-local-repository.com:8000/pypi/package-name/package-name-0.0.0-py3-none-any.whl.metadata
When I try and run the same installation of the package using the URL from PyPi, it works without issue:
$ pip install --trusted-host https://pypi.org/simple/ --index-url https://pypi.org/simple/ --extra-index-url https://pypi.org/simple/ package-name[optional-dependencies]
I have tried opening the .whl
files from both repositories to inspect for any differences, but have found that both appear to be the identical.
Another thing to note would be that downgrading pip
back to v22.0 allows the installation to go through without issue.
What could be causing this issue, and how can I resolve it while using the latest version of pip
? Thanks!