Search code examples
pythonpython-3.xpipnexuspypi

Failed to install custom lib deployed on Sonatype Nexus Pypi repository


  • pip: 18.0
  • python: 3.6
  • Nexus: 3.13

We have a corporate Nexus installed for hosting internal libraries, and a hosted pypi repository has been created.

I was able to deploy a wheel file following this instruction, but failed to install it locally.

Command to install:

python -m pip install --index-url https://xxxx/xxx-pypi/ 'customlib==0.0.1' -v

Error received:

Could not find a version that satisfies the requirement customlib==0.0.1 (from versions: )
No matching distribution found for customlib==0.0.1

Please advise on this issue. Thanks in advance!


Solution

  • Your index URL isn't correct, see here for how to configure pip to work with Nexus Repo 3:

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