pip is no stranger to friends who use python. When you want to install a python module, you will definitely think of it first. pip is a tool for installing and managing Python packages, and is a replacement for easy_install.
Today, let’s talk about how to install pip.
Method 1: Script installation
$ wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py $ [sudo] python get-pip.py
Method 2: Source code installation:
$ curl -O https://pypi.python.org/packages/source/p/pip/pip-X.X.tar.gz $ tar xvfz pip-X.X.tar.gz $ cd pip-X.X $ python setup.py install
But an error may occur during the installation process:
An error occurred while trying to run get-pip.py. Make sure you have setuptools or distribute installed.
This error means that you need to install setuptools first
setuptools installation:
wget -q http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py
After installing setuptools, just install it from source again.