Detailed description of PIP installation using CentOS system

Source: Internet
Author: User

Pip is similar to Yum in Redhat, which is handy for installing Python packages. This section details the installation of PIP and how to use it.

First, pip download installation

1.1 Pip Download

wget "HTTPS://PYPI.PYTHON.ORG/PACKAGES/SOURCE/P/PIP/PIP-1.5.4.TAR.GZ#MD5=834B2904F92D46AAA333267FB1C922BB"-- No-check-certificate


1.2 PIP Installation

# TAR-XZVF Pip-1.5.4.tar.gz

# CD pip-1.5.4

# python setup.py Install


1.3 If PIP command still does not have pip after installation, you need to add environment variable

# Vim/etc/profile

At the end of the document, add:

Export path= "/usr/local/python2.7/bin: $PATH"

Save, exit

Then run:

#source/etc/profile


Second, view the PIP version

Pip-v

Pip 1.5.4 From/usr/local/python2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg (Python 2.7)


Third, Pip use detailed

3.1 PIP installation package

Pip Install Paramiko

[...]

Successfully installed Paramiko


3.2 pip to view installed packages

[[Email protected]]# pip show--files Paramiko

---

Name:paramiko

version:1.16.0

Location:/usr/local/python2.7/lib/python2.7/site-packages

Requires:pycrypto, ECDSA

Files:

Cannot locate Installed-files.txt


3.3 Pip checks which packages need to be updated

[[Email protected]/]# PIP list--outdated

Setuptools (Current:0.6c11 latest:19.2)

Pip (current:1.5.4 latest:7.1.2)

Django (current:1.8.5 latest:1.9.1)


3.4 Pip Upgrade Pack

Pip Install--upgrade Django


3.5 Pip Offload Package

Pip Uninstall Django


Iv. Common Mistakes

4.1 importerror No module named Setuptools Solutions

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz

Tar zxvf setuptools-0.6c11.tar.gz

CD SETUPTOOLS-0.6C11

Python setup.py Build

Python setup.py Install


4.2 importerror:cannot Import name Httpshandler solution

Yum installs OpenSSL and Openssl-devel, and then recompile python


Five, the PIP parameter explanation

# pip--help

Usage:

Pip <command> [Options]

Commands:

Install the installation package.

Uninstall Uninstall the package.

Freeze output The list of installed packages in a certain format

The list lists the installed packages.

Show shows package details.

Search package, like search in Yum.

Wheel Build wheels from your requirements.

Zip is not recommended. Zip individual packages.

Unzip not recommended. Unzip individual packages.

Bundles are not recommended. Create Pybundles.

Help current assistance.

General Options:

-H,--help displays help.

-V,--verbose more output, can use up to 3 times

-V,--version the actual version information and then exits.

-Q,--quiet the least output.

--log-file <path> Overwrite the way the verbose error log is logged, default file:/root/.pip/pip.log

--log <path> logs that record verbose output are not overwritten.

--proxy <proxy> Specify a proxy in the form [User:[email protected]]proxy.server:port.

--timeout <sec> Connection time-out (default 15 seconds).

--exists-action <action> Default Action when a path already exists: (s) witch, (i) Gnore, (W) Ipe, (b) ackup.

--cert <path> certificates.


(end)

This article is from the "Small Five Car God" blog, please be sure to keep this source http://linuxtech.blog.51cto.com/3670088/1731147

Detailed description of PIP installation using CentOS system

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.