Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Email

174.5. FAQ

174.5.1. TracError: Cannot load Python bindings for MySQL

检查 MySQLdb 是否安装

			
# /usr/bin/python -c 'import MySQLdb'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named MySQLdb
			
			

安装MySQLdb

# yum install python-devel
# pip install MySQL-python
			

或者

# yum install python-devel
# easy_install MySQL-python
			

再次测试,如果不出现任何提示表示成功。

# /usr/bin/python -c 'import MySQLdb'
			
comments powered by Disqus