Introduction to simple processing tools in Python package management

Source: Internet
Author: User

If you want to simplify Python package management, you can use the easy_install tool to "match" Python package management. The tool is similar to pear in Php, or gem in Ruby or cpan in Perl.

If you want to use the easy_install tool, you can directly install the ez_setup.py script, and then install python before python ez_setup.py ):

After installation, make sure that the directory where easy_install is located has been added to the PATH environment variable:

 
 
  1. Windows: C:\Python25\Scripts  
  2. Linux: /usr/local/bin 

For example, to install Python MySQL support, run the following command. The system will automatically search for related software packages in the pypi website list and select the appropriate version:

 
 
  1. easy_install MySQL-python 

Install software in package management with easy_install, the relevant installation information is saved to the easy-install.pth file, the path is similar to the following form:

 
 
  1. Windows:C:\Python25\Lib\site-packages\
    easy-install.pth  
  2. Linux:/usr/local/lib/python25/site-packages
    /easy-install.pth 

To delete a software package installed through easy_install, for example, MySQL-python, run the following command:

 
 
  1. easy_install -m MySQL-python 

This operation will erase MySQL-python related information from the easy-install.pth file, the remaining egg file, you can manually delete. For python packages that have been downloaded, easy_install can also be installed. You only need to enter the package directory and then "easy_install." To learn more, see peak introduction.

Use easy_install to install the python environment:

1. Download The python2.5 Installation File to install the latest stable version. Do not try python2.6 or 3.0 because many py packages are not supported yet)

  • Use Python core programming to crack difficulties in game exercises
  • Detailed description of Python implementation of the payment Interface
  • How to Use variables and character constants in Python objects
  • Introduction to Python strings and escape sequences
  • Three steps to install Python on a 64-bit Aix System

2. Download The pyreadline executable file for installation.

3. Download ez_install.py to run

4. easy_install ipython ipy pylint django robotframework mechanic

5. Special cases where easy_install cannot be used:

A. if you install the default MySQL-python version, an error is returned. You must specify the following version: easy_install "MySQL-python = 1.2.2"

B. Some Packages may fail to be directly installed with easy_install. You need to download and install them by yourself:

Wxpython, pil to download the exe installer robotide because it cannot be found on pypi, You need to download it before easy_install. The above content introduces the actual process of making Python package management simple by easy_install.

 

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.