Python PIP Package Management

Source: Internet
Author: User

First, preface

in Python, installing a third-party module is done bySetuptoolsThis tool is done. Python has two package management tools that encapsulate Setuptools:Easy_installand thePip, it is currently recommended to use PIP.

Pip is similar to the Yum in the Rhel system, or the Apt-get tool under Ubuntu. Python packages can be installed with great ease.

Pip is a tool for installing and managing Python packages and is a replacement for Easy_install. This article details how to install the PIP and some basic operations using PIP such as installing, updating, and uninstalling the Python package.

Distribute is replaced by Setuptools (the Setuptools package is no longer maintained), and Pip is replaced by Easy_install.

PIP installation requires Setuptools or distribute, if you are using python3.x then you can only use distribute because python3.x does not support Setuptools.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/82/FF/wKioL1docMHTd10zAACn54-vwTU389.png "title=" 1.png " alt= "Wkiol1docmhtd10zaacn54-vwtu389.png"/>

Second, installation

Do I need to install PIP?

PIP is already installed if you ' re using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org, but You'll need to upgrade PIP.


Installing with get-pip.py

To install PIP, securely download get-pip.py.

Then run the following:

# wget https://bootstrap.pypa.io/get-pip.py# python get-pip.py


2, install the Setuptools (after the previous step of installation, it is no longer necessary to perform)

# wget Https://bootstrap.pypa.io/ez_setup.py-O-| python# Easy_install--version


Third, the use

Here's a look at the use of PIP:

1. Installation package

# pip Install Somepackage

2. Install a specific version of the package by using = =, >=, <=, <, to specify a version number.

# pip Install ' somepackage<2.0 ' # pip install ' somepackage>2.0,<2.0.3 '

3, upgrade package to the latest version, you can use-U or--upgrade

# pip Install-u somepackage

4. Unload the Package

# pip Uninstall Somepackage

5. Inquiry Package

# PIP Search "multiprocessing"

6, list the installed packages

# PIP Freeze


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/00/wKiom1doemfjEH6lAADRplyaHvY154.png "title=" 2.png " alt= "Wkiom1doemfjeh6laadrplyahvy154.png"/>


This article is from the "Share Your Knowledge" blog, so be sure to keep this source http://skypegnu1.blog.51cto.com/8991766/1791223

Python PIP Package Management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.