How to use and setup pip server path to get the packages ?

In this article, we will see how to configure pip server path on our system to get the packages automatically.

Lets see this step by step.

1. Direct Command Line Installation Steps

Both pip and easy_install support the -i option to specify an index server url, example for simplejosn

#pip install –trusted-host -i simplejson


2. Permanent Configuration Installation Steps

b.  To avoid having to re-type index URLs with pip or easy-install , you can configure pip by setting the index-url entry in your $HOME/.pip/pip.conf (posix) or, $HOME/pip/pip.ini (windows).

# $HOME/.pip/pip.conf


index-url =

or, Alternatively, you can add a special environment variable to your shell settings (e.g. .bashrc):

or, For pip search you need a [search] section in your pip.conf:

or, You can configure easy_install by an entry in the $HOME/.pydistutils.cfg file:

# $HOME/.pydistutils.cfg:


index_url =

And in the end we can install it with command:

#pip install simplejson


Note:- Make sure the URL is correct to get all the packages through pip successfully.


3. Working Example: How i used to work in this.

[user@ngelinux001 .pip]$ cat pip.conf


index-url =

[user@ngelinux001 .pip]$

[user@ngelinux001 .pip]$ /grid/common/pkgs/python/v3.10.4/bin/python3 -m pip install simplejson --trusted-host

Defaulting to user installation because normal site-packages is not writable

Looking in indexes:

Collecting simplejson

  Downloading (137 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.1/137.1 kB 383.4 kB/s eta 0:00:00

Installing collected packages: simplejson

Successfully installed simplejson-3.17.6

WARNING: There was an error checking the latest version of pip.

[user@ngelinux001 .pip]$
0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments