no module names _mysql; where is _mysql
import MySQLdb
and
traceback:
Traceback (most recent call last):
File "D:\zjm_code\sphinx_test\a.py", line 1, in <module>
import MySQLdb
File "D开发者_如何学运维:\zjm_code\sphinx_test\MySQLdb\__init__.py", line 19, in <module>
import _mysql
ImportError: No module named _mysql
You need to install MySQLdb correctly. It consists of the python module and platform-dependent library (_mysql.dll
in your case). Use the win32 installer from the project page instead of installing just by unpacking sources.
精彩评论