A concise guide to [Python] Pip

Source: Internet
Author: User
Tags virtualenv

Installation

1. Use apt to install:

sudo Install Python-pip

As of this article, APT installs PIP version 1.0, but Pip latest release is 1.5.6

$ pip--1.0 From/usr/lib/python2. 7 2.7)

PIP 1.0 Features:

$ pip-Husage:pip COMMAND [options]options:--version Show Program'S version number and exit-H,--Help Show Help-E DIR,--environment=DIR virtualenv Environment to run PIPinch(either give the interpreter or the Environment base directory)-S,--enable-site-Packages Include Site-packagesinchVirtualenvifOne is to be created. Ignoredif--environment is not used or the virtualenv already exists. -V,--verbose Give MoreOutput-Q,--quiet Give LessOutput--log=filename Logfilewhere a complete (maximum verbosity) record would be kept--proxy=proxy Specify a proxyinchThe form User:passwd@proxy. Server:port. Note that the User:[email protected] are optional and required onlyifYou is behind an authenticated proxy. If you provide [email protected]:p ort ThenYou'll be prompted fora password. --timeout=seconds,--default-timeout=SECONDS Set The socket timeout (default theseconds) Commands available:bundle:Create pybundles (archives containing multiple packages) Freeze:output all currently instal LED packages (exact versions) to stdout Help:show available commandsInstall: Install packages search:search PyPI Uninstall:uninstall packagesUnzip: Unzip Individual PackagesZip: Zip Individual Packages
View Code

2. Install with get-pip.py:

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

3. Upgrade

sudo Install -Install -u pip

Use

1. Install the package:

Install somepackage              Install somepackage==1.0. 4 Install ' somepackage>=1.0.4 ' # minimum version           

1.1. Upgrade Installed Packages:

sudo install -u chardet

2. Uninstall the package:

sudo pip uninstall bottle

3. Search the package:

$ pip Search Bottle

4. List the installed package:

$ pip List

4.1. List Expired Package:

$ pip List--outdated

5. Show installed package details

$ pip Show gevent---1.0. 1  /usr/local/lib/python2. 7/dist-packagesrequires:greenlet

A concise guide to [Python] Pip

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.