开发者

no module names _mysql; where is _mysql

开发者 https://www.devze.com 2022-12-18 20:25 出处:网络
import MySQLdb and traceback: Traceback (most recent call last): File \"D:\\zjm_code\\sphinx_test\\a.py\", line 1, in <module>
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号