Home > Backend Development > Python Tutorial > Detailed explanation of python package manager pip installation

Detailed explanation of python package manager pip installation

高洛峰
Release: 2016-10-17 17:37:47
Original
1401 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

After installing setuptools, just install it from source again.


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template