I am using the following way to install pip on redhat 7.5 version

I download the pkg - pip-8.1.2-py2.py3-none-any.whl to the machine without network

and I instal it

python /root/pip-8.1.2-py2.py3-none-any.whl/pip install /root/pip-8.1.2-py2.py3-none-any.whl

but I am not sure if this is the right approach to install the pip ?

we try by -

clone https://github.com/psf/requests.git

then copy the file to the machine that not have network


python setup.py install

, but by this way I get errors , so we leave it

the errors are on the last line

any way we can see that from some unclear reason this approach try to get internet network , so I not understand why?

python setup.py install
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
running install
running bdist_egg
running egg_info
writing requirements to requests.egg-info/requires.txt
writing requests.egg-info/PKG-INFO
writing top-level names to requests.egg-info/top_level.txt
writing dependency_links to requests.egg-info/dependency_links.txt
reading manifest file 'requests.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'NOTICE'
warning: no files found matching 'requirements.txt'
writing manifest file 'requests.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/__init__.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/__version__.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/_internal_utils.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/adapters.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/api.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/auth.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/certs.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/compat.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/cookies.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/exceptions.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/help.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/hooks.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/models.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/packages.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/sessions.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/status_codes.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/structures.py -> build/bdist.linux-x86_64/egg/requests
copying build/lib/requests/utils.py -> build/bdist.linux-x86_64/egg/requests
byte-compiling build/bdist.linux-x86_64/egg/requests/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/__version__.py to __version__.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/_internal_utils.py to _internal_utils.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/adapters.py to adapters.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/api.py to api.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/auth.py to auth.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/certs.py to certs.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/compat.py to compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/cookies.py to cookies.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/exceptions.py to exceptions.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/help.py to help.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/hooks.py to hooks.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/models.py to models.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/packages.py to packages.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/sessions.py to sessions.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/status_codes.py to status_codes.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/structures.py to structures.pyc
byte-compiling build/bdist.linux-x86_64/egg/requests/utils.py to utils.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying requests.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/requests-2.22.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing requests-2.22.0-py2.7.egg
removing '/usr/lib/python2.7/site-packages/requests-2.22.0-py2.7.egg' (and everything under it)
creating /usr/lib/python2.7/site-packages/requests-2.22.0-py2.7.egg
Extracting requests-2.22.0-py2.7.egg to /usr/lib/python2.7/site-packages
requests 2.22.0 is already the active version in easy-install.pth

Installed /usr/lib/python2.7/site-packages/requests-2.22.0-py2.7.egg
Processing dependencies for requests==2.22.0
Searching for urllib3>=1.21.1,!=1.25.0,!=1.25.1,<1.26
Reading https://pypi.python.org/simple/urllib3/
Best match: urllib3 1.25.6
Downloading https://files.pythonhosted.org/packages/ff/44/29655168da441dff66de03952880c6e2d17b252836ff1aa4421fba556424/urllib3-1.25.6.tar.gz#sha256=9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86
Processing urllib3-1.25.6.tar.gz
Writing /tmp/easy_install-WI5FBQ/urllib3-1.25.6/setup.cfg
Running urllib3-1.25.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-WI5FBQ/urllib3-1.25.6/egg-dist-tmp-tEDlGM
error: Setup script exited with error in urllib3 setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
  • What errors do you get? Also, what's the point of setting up pip on a machine without internet access?
    – Panki
    Oct 18, 2019 at 10:35
  • I update my question
    – yael
    Oct 18, 2019 at 10:54
  • 1
    Good question in my opinion. Too bad I don't have enough reputation to have my vote taken into account. Installing in python is often painful, every attempt to make it easier should be rewarded! Oct 18, 2019 at 10:58

1 Answer 1


Answer using the latest pip version.

Download the setuptools compressed file from here:

wget https://files.pythonhosted.org/packages/f4/d5/a6c19dcbcbc267aca376558797f036d9bcdff344c9f785fe7d0fe9a5f2a7/setuptools-41.4.0.zip

Unzip , change directory then install it: python setup.py install

Download pip from here :

wget https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz

Untar , change directory then install it : python setup.py install

Old pip versions can be found here. pip 8.1.2

Old setuptools versions can be found here. setuptools 20.0.0

Release Notes

  • 1
    your answer described how to install the latest version of pip - and that great , what in my case that I need the version - pip-8.1.2 , can you add additional step how to install the version 8.1.2?
    – yael
    Oct 18, 2019 at 11:06
  • can I ask another question - lets say I installed the ;latest version , then can we do downgrade without connecting to the network as - python -m pip install pip==8.1.2 --upgrade ?
    – yael
    Oct 18, 2019 at 11:21
  • @yael I have update my answer. You can't downgrade without an Internet connection.
    – GAD3R
    Oct 18, 2019 at 11:23
  • 1
    @yael pip 8.1.2 It should work without problem with the latest setuptools release.
    – GAD3R
    Oct 18, 2019 at 11:29
  • 1
    thank you so much - so I will download the pip version 8.1.2 ans the latest setuptools version on productions machines that not have network because security resins hope everything will be ok
    – yael
    Oct 18, 2019 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .