Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 没有模块名称mysql;你在哪里_Python_Mysql - Fatal编程技术网

Python 没有模块名称mysql;你在哪里

Python 没有模块名称mysql;你在哪里,python,mysql,Python,Mysql,及 回溯: import MySQLdb 回溯(最近一次呼叫最后一次): 文件“D:\zjm_code\sphinx_test\a.py”,第1行,在 导入MySQLdb 文件“D:\zjm_code\sphinx_test\MySQLdb\\uuuuu init_uuu.py”,第19行,在 导入mysql ImportError:没有名为_mysql的模块 您需要正确安装MySQLdb。它由python模块和依赖于平台的库组成(在您的例子中是mysql.dll)。从项目页面使用win32安

回溯:

import MySQLdb
回溯(最近一次呼叫最后一次):
文件“D:\zjm_code\sphinx_test\a.py”,第1行,在
导入MySQLdb
文件“D:\zjm_code\sphinx_test\MySQLdb\\uuuuu init_uuu.py”,第19行,在
导入mysql
ImportError:没有名为_mysql的模块

您需要正确安装MySQLdb。它由python模块和依赖于平台的库组成(在您的例子中是mysql.dll)。从项目页面使用win32安装程序,而不是仅通过解包源代码进行安装。

您需要正确安装MySQLdb。它由python模块和依赖于平台的库组成(在您的例子中是mysql.dll)。从项目页面使用win32安装程序,而不是仅通过解包源文件进行安装。

您应该编辑问题的标题,使其有意义。“模型名”?“模型名称”与此有什么关系?您应该编辑问题的标题,使其有意义。“模型名”?“模型名”与此有什么关系?
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