Preface
Managing "Expansion Kits" is a very important part of any operating system and programming language. With an expansion kit, it's easier to manipulate the computer, and programmers are more relaxed.
You may have heard the phrase "do not rebuild the wheel", or DRY (Don t Repeat yourself), saying that "someone else has already written something good, use it, don't rewrite it yourself."
This introduction of Easy_install and Pip, is the Python programming language Suite Management program, so you can directly use the predecessors of the effort of the crystal.
The following Syria instructions, with the # Open, please use the root authority, starting with $, using the general user rights.
Python's Expansion kit format--Snake egg
Python's representative animal is "snake". Interestingly, Python's expansion kit ends with a. Egg. Egg can be a record or a zip file. 01. Installation Easy_install
At the moment, many operating systems have been configured with relational Python programming language, and Esay_install have been built at the same time. If there is no easy_install in the system, it can be installed in the following ways: I. Use the operating system Suite management program to install
Using the operating system's suite management program, the name is usually setuptools in a Linux-related release. II. Install on the official web site
Please search for ez_setup.py links in the following Web site.
Http://pypi.python.org/pypi/setuptools
After downloading, enter the following instructions in the command line mode:
Python ez_setup.py
If the operating system is windows, you can also use the Windows installation file named Setuptools-0.6c11.win32-py2.x.exe. 02. Installation Pip
As with Easy_install, some of the operating systems have been built inside. If not, enter the following instructions in the command line mode:
# Curl Http://python-distribute.org/distribute_setup.py | Python
# curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
If you are in a easy_install environment, enter the following instructions in the command line mode:
# Easy_install Pip
According to Pip's official website, Setuptools currently does not support Python3, so if your Python version is 3.x, remember to use the first installation method. Use examples Easy_install I. Use of Easy_install installation kits
Enter the following instructions in the command line mode:
# Easy_install [Kit name]
The preset is installed with the latest version.
Specific versions of the installation can also be specified as follows:
# easy_install ' [kit name]==[version] '
Take the installation virtualenv and specify the 1.6.3 version as an example:
# easy_install ' virtualenv==1.6.3 '
You can specify a version of a sample:
# easy_install ' virtualenv>=1.6.3 '
# easy_install ' virtualenv<1.6.3 '
You can also specify a network link to install:
# Easy_install Http://example.com/virtualenv.egg
If you want to know the installation before installation, you can use the--dry-run parameters, such as:
# Easy_install Virtualenv--dry-run
Ii. using Easy_install to remove Kits
If you use the following example, Easy_install will remove your easy-install.pth virtualenv, and then go to the Python packages to "remove" all virtualenv files:
# easy_install-m Virtualenv
iii. use Easy_install to list all installed Kits
Easy_install itself does not support this feature, but it can be reached using yolk.
First, use Easy_install to install yolk. Enter the following instructions in the command line mode:
# Easy_install Yolk
Then use the yolk and its parameters L. Enter the following instructions in the command line mode:
$ yolk-l
pil -1.1.6 -active
Python -2.5.4 -active
html5lib -0.11.1 -active< c9/> ...
To list only the "active" packages, you can use the parameters a. Enter the following instructions in the command line mode:
$ yolk-a
If you want to list only the upgraded suite, you can use the reference U. Enter the following instructions in the command line mode:
$ yolk-u
Iv. using the Easy_install upgrade Kit
Enter the following instructions in the command line mode:
# easy_install-u Virtualenv
To upgrade all of the upgraded kits at once, you need to match the yolk that you introduced earlier. Enter the following instructions in the command line mode:
# Yolk-u | Cut-d '-F 2 | Xargs Easy_install
v. List the use Cases
To learn more about the use of Easy_install, you can enter the following instructions in command-line mode:
# Easy_install--help
Pip
I. Using PIP installation Kit
Enter the following instructions in the command line mode:
# PIP [Name of package]
The preset is installed with the latest version.
Can also install the specified version as follows:
# pip ' [kit name]==[version] '
Take the installation virtualenv and specify the 1.6.3 version as an example:
# pip ' virtualenv==1.6.3 '
Or you can specify a version of a sample:
# pip ' virtualenv>=1.6.3 '
# pip ' virtualenv<1.6.3 '
You can also specify a network link to install:
# pip Install install http://example.com/virtualenv-1.6.4.zip
# pip Install git+https://github.com/simplejson/ Simplejson.git
# pip Install svn+ssh://svn.zope.org/repos/main/zope.interface/trunk/
Ii. using the PIP to remove the kit
Pip compared to Easy_install, support for more self cleaning work, and then continue to no longer need to manually clean the left file.
Enter the following instructions in the command line mode:
# PIP Uninstall [kit name]
iii. use PIP to list all installed Kits
Enter the following instructions in the command line mode:
# pip Freeze
beautifulsoup==3.1.0.1
cddb==1.4
cherrypy==3.1.2
...
Iv. using the PIP upgrade Kit
Enter the following instructions in the command line mode:
# PIP Install-u [kit name]
v. Use PIP to search for an installed or managed kit
Enter the following instructions in the command line mode:
# PIP search [keywords]
Vi. Listing examples of use
To list the use examples for the PIP, you can enter the following instructions in command-line mode:
# PIP Help
Vii. using PIP to seal related kits
PIP support to seal the related suite in a file, the future file can be easily copied into the other environment.
The kit Vimpyre, for example, requires about 3 to 4 kits. This can be in command-column mode