PIP installation steps and usage in Linux

Source: Internet
Author: User
Tags install redis

Pip is similar to Yum in Redhat, and it's easy to install software. This section details the installation of PIP and how to use it, and I hope the article will help you understand the installation and use of PIP.

1. Pip Download and install
1.1 Pip Download

The code is as follows Copy Code
# wget "HTTPS://PYPI.PYTHON.ORG/PACKAGES/SOURCE/P/PIP/PIP-1.5.4.TAR.GZ#MD5=834B2904F92D46AAA333267FB1C922BB"-- No-check-certificate

1.2 PIP Installation

The code is as follows Copy Code
# 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 software

The code is as follows Copy Code
# pip Install Somepackage
[...]
Successfully installed Somepackage

2.2 pip to view installed software

The code is as follows Copy Code
# 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 software needs to be updated

The code is as follows Copy Code
# PIP List--outdated
Somepackage (current:1.0 latest:2.0)

2.4 Pip Upgrade Software

The code is as follows Copy Code
# 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 Uninstall software

The code is as follows Copy Code
$ 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

The code is as follows Copy Code
# pip Install Redis

3.2 Uninstalling Redis

The code is as follows Copy Code
# 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 software to be updated

The code is as follows Copy Code
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

The code is as follows Copy Code
# pip--help

Usage:
Pip <command> [Options]

Commands:
Install the software.
Uninstall uninstall the software.
Freeze output the list of installed software in a certain format
List lists the installed software.
Show shows the software details.
Search software, 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:passwd@]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. The boss doesn't want me to install the software any more.

PIP installation steps and usage in Linux

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.