PIP installation Use detailed

Source: Internet
Author: User
Tags install redis

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

# 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

# TAR-XZVF Pip-1.5.4.tar.gz

# CD pip-1.5.4

# python setup.py Install


2. PIP Usage Details

2.1 PIP installation Package


# pip Install Somepackage

[...]

Successfully installed Somepackage


# pip Install Somepackage

[...]

Successfully installed Somepackage

2.2 pip to view installed packages


# pip Show--files somepackage

Name:somepackage

version:1.0

Location:/my/env/lib/pythonx.x/site-packages

Files:

.. /somepackage/__init__.py

[...]


# pip Show--files somepackage

Name:somepackage

version:1.0

Location:/my/env/lib/pythonx.x/site-packages

Files:

.. /somepackage/__init__.py

[...]

2.3 PIP checks which packages need to be updated


# PIP List--outdated

Somepackage (current:1.0 latest:2.0)


# PIP List--outdated

Somepackage (current:1.0 latest:2.0)

2.4 Pip Upgrade Pack


# pip Install--upgrade somepackage

[...]

Found Existing Installation:somepackage 1.0

Uninstalling Somepackage:

Successfully uninstalled Somepackage

Running setup.py Install for Somepackage

Successfully installed Somepackage


# pip Install--upgrade somepackage

[...]

Found Existing Installation:somepackage 1.0

Uninstalling Somepackage:

Successfully uninstalled Somepackage

Running setup.py Install for Somepackage

Successfully installed Somepackage

2.5 PIP Offload Package


$ pip Uninstall Somepackage

Uninstalling Somepackage:

/my/env/lib/pythonx.x/site-packages/somepackage

Proceed (y/n)? Y

Successfully uninstalled Somepackage


$ pip Uninstall Somepackage

Uninstalling Somepackage:

/my/env/lib/pythonx.x/site-packages/somepackage

Proceed (y/n)? Y

Successfully uninstalled Somepackage

3. PIP Usage Example

3.1 Installing Redis


# pip Install Redis

1

# pip Install Redis

3.2 Uninstalling Redis


# pip Uninstall Redis

Uninstalling Redis:

/usr/lib/python2.6/site-packages/redis-2.9.1-py2.6.egg-info

..... Omit some content ....

Proceed (y/n)? Y

Successfully uninstalled Redis


# pip Uninstall Redis

Uninstalling Redis:

/usr/lib/python2.6/site-packages/redis-2.9.1-py2.6.egg-info

..... Omit some content ....

Proceed (y/n)? Y

Successfully uninstalled Redis

3.3 Viewing the package to be updated


Pip List--outdate

Pygpgme (current:0.1 latest:0.3)

Pycurl (current:7.19.0 latest:7.19.3.1)

Iniparse (current:0.3.1 latest:0.4)


Pip List--outdate

Pygpgme (current:0.1 latest:0.3)

Pycurl (current:7.19.0 latest:7.19.3.1)

Iniparse (current:0.3.1 latest:0.4)

4. Common errors

4.1 importerror No module named Setuptools

Please refer to "Importerror No module named Setuptools solution"

5. 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.


6. End

The installation is easy to use at a glance.


This article from "Flat Light is true" blog, please be sure to keep this source http://cryan.blog.51cto.com/10837891/1727185

PIP installation Use detailed

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.