PythonMySQL library Installation notes

Source: Internet
Author: User
In fact, MySQL-python is very simple to install, and I have never been concerned about it before. Today I found that the new version 1.2.3 has changed, and ms has encountered many problems. Make a record to prevent any problems in the future. General steps: Install easy_installshellwgetpeak.telecommunity.comdistez_setup.pyshellpythonez_setup.py

In fact, MySQL-python is very simple to install, and I have never been concerned about it before. Today I found that the new version 1.2.3 has changed, and ms has encountered many problems. Make a record to prevent any problems in the future. General steps are: Install easy_install shell wget http://peak.telecommunity.com/dist/ez_setup.pyshell python ez_setup.py

In fact, MySQL-python is very simple to install, and I have never been concerned about it before. Today I found that the new version 1.2.3 has changed, and ms has encountered many problems. Make a record to prevent any problems in the future.

The general steps are as follows:

  1. Install easy_install

shell > wget http://peak.telecommunity.com/dist/ez_setup.pyshell > python ez_setup.py

The corresponding egg is automatically selected based on The py version of the Local Machine. After installation, the/usr/bin/easy_install program is displayed.

  1. Install MySQL-python

shell > easy_install MySQL-python

The installation is complete, but the next test will be depressing.

Two errors occur in import MySQLdb:

a). ImportError: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory

This error is generally easy to solve. You can add the path to LD_LIBRARY_PATH. However, this problem is even more serious because MySQL is not installed. Haha

b). ImportError: /lib/tls/libc.so.6: version `GLIBC_2.4' not found

The solution to this error is easy_install. download the mysql-python-1.2.2.tar.gz package directly, and take the following three steps:

shell > tar zxvf MySQL-python-1.2.2.tar.gzshell > cd MySQL-python-1.2.2shell > python setup.py install

Original article address: Installation notes for the Python MySQL library. Thank you for sharing the original 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.