gpt4 book ai didi

python - 导入 MySQLdb 错误

转载 作者:行者123 更新时间:2023-11-29 05:40:49 24 4
gpt4 key购买 nike

您好,我在尝试导入 MySQLdb 时遇到以下错误。有谁知道可能是什么问题?(我在 Mac 上)

>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py", line 19, in <module>
File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/christopherfarm/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find:
/Users/christopherfarm/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture

最佳答案

您必须安装为您的架构构建的 egg,或者从源代码(即 .zip 或 .tar.gz)安装。

关于python - 导入 MySQLdb 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6954213/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com