pip is already installed if you’re using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org. And, pip will already be installed if you’re working in a Virtual Environment created by virtualenv or pyvenv. Otherwise, you must install pip.
Method 1:
Step 1: install setuptools
How to install python setuptools library on Linux
Step 2: download get-pip.py
wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
Result:
[root@tutorialspots ~]# wget --no-check-certificate https://bootstrap.pypa.io/get-pip .py --2016-05-06 13:45:07-- https://bootstrap.pypa.io/get-pip.py Resolving bootstrap.pypa.io... 23.235.46.175 Connecting to bootstrap.pypa.io|23.235.46.175|:443... connected. WARNING: certificate common name `*.c.ssl.fastly.net' doesn't match requested ho st name `bootstrap.pypa.io'. HTTP request sent, awaiting response... 200 OK Length: 1522812 (1.5M) 1 Saving to: `get-pip.py' 100%[======================================>] 1,522,812 9.38M/s in 0.2s 2016-05-06 13:45:07 (9.38 MB/s) - `get-pip.py' saved [1522812/1522812]
Step 3: install pip
python2.7 get-pip.py --no-setuptools
Result:
[root@tutorialspots ~]# python2.7 get-pip.py --no-setuptools Collecting pip /tmp/tmpAkfbPh/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: S NIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indi cation) extension to TLS is not available on this platform. This may cause the s erver to present an incorrect TLS certificate, which can cause validation failur es. For more information, see https://urllib3.readthedocs.org/en/latest/security .html#snimissingwarning. /tmp/tmpAkfbPh/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: I nsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connection s to fail. For more information, see https://urllib3.readthedocs.org/en/latest/s ecurity.html#insecureplatformwarning. Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB) 100% |################################| 1.2MB 533kB/s Collecting wheel Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) 100% |################################| 71kB 5.2MB/s Installing collected packages: pip, wheel Successfully installed pip-8.1.1 wheel-0.29.0 /tmp/tmpAkfbPh/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: I nsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connection s to fail. For more information, see https://urllib3.readthedocs.org/en/latest/s ecurity.html#insecureplatformwarning.
Done! now you can see pip (and wheel) installed in /usr/local/bin
Method 2:
After install setuptools, you can use this command to install pip
easy_install pip
3 Comments
How to install python virtualenv on Linux | Free Online Tutorials
(May 6, 2016 - 7:45 pm)[…] Read: How to install python pip on Linux […]
How to use SSL certificate free of Let’s Encrypt on Linux | Free Online Tutorials
(May 7, 2016 - 9:00 am)[…] How to install python pip on Linux […]
How to install package python-pip on Centos | Free Online Tutorials
(August 24, 2020 - 7:19 pm)[…] With CentOS/RHEL 5: You must install manually python pip following this tutorial: How to install python pip on Linux […]