Install or Download Python Package Using Nexus repositories

Jajula Ramesh
1 min readApr 19, 2021

--

Steps to config Nexus pypi.org

To download packages from Nexus instead of Pypi , we need to config pip.ini , most of the time, its not only speed up build processes by caching commonly used dependencies but also help ensuring reproducible builds, since one only depends on their Nexus availability and not the public repositories.

pip can also be configured to upload packages to Nexus, enabling the management of artifacts private to an organization.

Downloading/Installing packages from Nexus

In order to enable pip to download packages from Nexus, it is necessary to edit pip configuration file. This can be done on a per-user, per-virtualenv or system-wide basis. For the remainder of this section we will assume a per-user configuration. To use a different configuration, one should refer to pip's documentation.

The per-user configuration file is located in different places on different OS’es:

  • On Linux: ${HOME}/.config/pip/pip.conf.
  • On Windows: %APPDATA%\pip\pip.ini.

Edit the corresponding file as follows:

[global]
index = https://nexus.example.com/repository/pypi-all/pypi
index-url = https://nexus.example.com/repository/pypi-all/simple
no-cache-dir = false

This will instruct pip to search for and install packages from the pypi-all group, previously configured in Nexus.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jajula Ramesh
Jajula Ramesh

Written by Jajula Ramesh

Aspiring Data Scientist Learner with hunger for knowledge Life enthusiast with adventurous minds Data Cleaner, Models Builder, Problem Solver

Responses (1)

Write a response