小编use*_*469的帖子

在 OS X 上导入 MySQLdb 时出现“导入错误:动态模块未定义 init 函数 (init_mysql)”

我在 mac os x 上安装了 python 的 mysqldb,但它给了我以下错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.6-intel/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.macosx-10.6-intel/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.6-intel/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dynamic module does not define init function (init_mysql)
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

python python-2.7

2
推荐指数
1
解决办法
2626
查看次数

标签 统计

python ×1

python-2.7 ×1