Richard B
Richard B

Reputation: 935

Can't find whl when using local pypi repository

I'm trying to use a local nexus pypi repository to store my python whls but cannot download them successfully using PIP.

Nexus is running on a machine with the ip W.X.Y.Z

and, via the web connection it shows my test repository

http://W.X.Y.Z:8081/#browse/browse/components:pypi-internal-test

If I select one of the whls it displays it shows a path of

Path    packages/tradeloader/1.1.0/tradeloader-1.1.0-py2.py3-none-any.whl

On my remote machine where I would like to install this whl I use the following command:

pip install --trusted-host W.X.Y.Z -i http://W.X.Y.:8081/repository/pypi-internal-test/packages tradeloader

It fails with the following

Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
Collecting tradeloader
  1 location(s) to search for versions of tradeloader:
  * http://W.X.Y.Z:8081/repository/pypi-internal-test/packages/tradeloader/
  Getting page http://W.X.Y.Z:8081/repository/pypi-internal-test/packages/tradeloader/
  Starting new HTTP connection (1): W.X.Y.Z
  "GET /repository/pypi-internal-test/packages/tradeloader/ HTTP/1.1" 401 0
User for W.X.Y.Z:8081: <<My user>>
Password:
  "GET /repository/pypi-internal-test/packages/tradeloader/ HTTP/1.1" 404 1814
  Could not fetch URL http://W.X.Y.Z:8081/repository/pypi-internal-test/packages/tradeloader/: 404 Client Error: Not Found for url: http://W.X.Y.Z:8081/repository/pypi-internal-test/packages
/tradeloader/ - skipping
  Could not find a version that satisfies the requirement tradeloader (from versions: )
Cleaning up...
No matching distribution found for tradeloader

If I try and download the whl via the browser using

http://X.X.Y.Z:8081/repository/pypi-all/packages/tradeloader/1.1.0/tradeloader-1.1.0-py2.py3-none-any.whl

the whl comes down fine but, of course, I'm being very specific about what I want there and would like pip to allow me to just ask for the most recent

I have been looking at this for a while and cannot see where I'm going wrong. Would anybody be able to help?

Edit: The following web page has the answer

Unable to install PyPi package

Upvotes: 0

Views: 1649

Answers (1)

rseddon
rseddon

Reputation: 5318

Have you configured pip.conf according to these instructions?

https://help.sonatype.com/display/NXRM3/PyPI+Repositories+-+NXRM+3#PyPIRepositories-NXRM3-ConfiguringPyPIClientTools

Upvotes: 2

Related Questions