Install python2.7 +pip below CentOS +mysqld_python

Source: Internet
Author: User

python2.7

Copy Code code as follows:

wget HTTP://WWW.PYTHON.ORG/FTP/PYTHON/2.7.6/PYTHON-2.7.6.TAR.XZ
Yum Install Xz-libs
Xz-d PYTHON-2.7.6.TAR.XZ
Ls
TAR-XVF Python-2.7.6.tar
CD Python-2.7.6
Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline
Ldflags= "-wl,-rpath/usr/local/lib"
Vim/etc/ld.so.conf
./configure--prefix=/usr/local--enable-unicode=ucs4--enable-shared ldflags= "-wl,-rpath/usr/local/lib"
Make clean
Make && make Altinstall

Pip

Copy Code code as follows:

wget--no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
TAR-VXF setuptools-1.4.2.tar.gz
CD setuptools-1.4.2
python2.7 setup.py Install
easy_install-2.7 pip

MySQLdb

Copy Code code as follows:

Yum-y Install Mysql-python
Yum-y Install Mysql-devel
easy_install-2.7 Mysql-python

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.