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:
- 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.
- 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.