Build a python high-performance framework gevent Development Environment on CentOS 6.3

Source: Internet
Author: User

Build a python high-performance framework gevent Development Environment on CentOS 6.3
1. Upgrade python 2.6 to python 2.7.
For business needs, upgrade python from 2.6.6 to 2.7.10 before installation. Refer to blog:
Http://blog.csdn.net/tao_627/article/details/46928899

Install other modules under python 2.7.

2. Install setuptools, that is, easy_install
Download and install setuptools. The official website is
Https://pypi.python.org/pypi/setuptools/
We recommend that you download ez_setup.py to install setuptools. In the python environment of the specified version (target Python version)
Setuptools requires Python 2.6 or later and runs as root users.
Wget -- no-check-certificate https://bootstrap.pypa.io/ez_setup.py

Python ez_setup.py

3. Install pip
Easy_install-2.7 pip
Then, check that pip is under python 2.7.
Pip-V




Next
1. Install libevent
Download the latest source code from the official website

Http://libevent.org/

Run the following command:
Cd/usr/local/src
Wget -- no-check-certificate https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
Tar zxf libevent-2.0.22-stable.tar.gz
Cd libevent-2.0.22-stable
./Configure
Make
Make install
Cp-f/usr/local/lib/libevent */usr/lib/


2. Install greenlet
Refer to the installation method on the official website

Https://pypi.python.org/pypi/greenlet

Run the following command
Easy_install-2.7 greenlet


3. Install gevent
Download the latest stable version 1.0.2 from the official website

Https://pypi.python.org/pypi/gevent#downloads

Use the following command
Wget -- no-check-certificate https://pypi.python.org/packages/source/g/gevent/gevent-1.0.2.tar.gz#md5=117f135d57ca7416203fba3720bf71c1
Tar zxf gevent-1.0.2.tar.gz
Cd gevent-1.0.2
Python setup. py install


4. Install pycurl
See blog
Http://blog.csdn.net/tao_627/article/details/46941809
Use the following command
Export PYCURL_SSL_LIBRARY = nss
Pip install pycurl

Check whether the pycurl module is successfully loaded.

5. Install lxml
Install the dependent libraries libxml2 and libxslt in advance
Yum-y install libxslt-devel
Yum-y install libxml *
Make sure that the above two libraries are available, use
Yum search libxslt


Run the following command:
Pip install lxml


For more information, see
Http://www.coder4.com/archives/3660

References

Http://www.th7.cn/system/lin/201212/35052.shtml.

Http://www.th7.cn/system/lin/201212/35052.shtml.

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.