Python Learning to install PIP and PIP usage

Source: Internet
Author: User

When you learn python, you see a lot of things that you don't know, like

Pip, is the Python Package management tool, Pip is the replacement of Easy_install.

Distribute is an enhancement to the standard library Disutils module, and we know that disutils is primarily used to package and distribute packages more easily, especially for packages that have dependencies on other packages.

Distribute was created because the Setuptools package is no longer maintained. Distribute is the replacement of Setuptools.

Installing distribute

Can be installed through the distribute_setup.py script distribute can also be installed through Easy_install, Pip, source files, but the use of distribute_setup.py to install is the simplest and popular way

Install PIP

Pip is a tool for installing the Python package, providing an installation package that lists the packages that have been installed, the upgrade package, and the ability to uninstall the package.

Pip is a replacement for Easy_install, which provides the same functionality for finding packages as Easy_install, so packages that can be installed using Easy_install can also be installed using PIP.

After the python is installed, go to the command line and switch the directory to the script folder under the Python installation directory to run Easy_inatall pip

Then view the PIP installation information:

In fact,PIP installation can be via source code package, Easy_install or script.

Here are the various installation methods:

Source Code mode installation:

$ wget http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz (replace with latest package) $ tar xzf pip-0.7.2.tar.gz$ CD pip-0.7.2 $ python setup.py Install

Easy_install Installation:

$ easy_install pip

get_pip.py Script Installation:

$ curl-0 https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ sudo python get-pip.py

Here 's a look at the use of Pip

1. Install the Package

$ pip Install Markdown

2, list the installed packages

$ pip Freeze

3. Install a specific version of the package

by using = =, >=, <=, <, specify a version number.

$ pip Install ' markdown<2.0 '
$ pip Install ' markdown>2.0,<2.0.3 '

4. Upgrade Package

Upgrade package to current latest version, can use-u or--upgrade

$ pip install-u Markdown

5. Unload the Package

$ pip Uninstall Markdown

6. Inquiry Package

Pip Search "Markdown"

PS--Package after installation of the Py file path:/usr/local/lib/python2.7/dist-packages

The following is an example of installing BEAUTIFULSOUP4 :

Go to the Scripts directory in the Python installation directory and open cmd

For more information, the blog about tools like Python's installation configuration is as follows:

Http://www.cnblogs.com/taosim/articles/3288821.html

Python Learning to install PIP and PIP usage

Related Article

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.