Python导入MySQLdb错误

时间:2014-08-15 02:31:24

标签: python python-2.7 mysql-python

我在将MySQLdb导入python时遇到问题。 我在小牛队中使用python 2.7。

我跟着this helpful post(以及其中的链接)进行安装,直到最后它们都很好看。但是当我在Python中导入模块时,我收到以下错误。

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/_mysql.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/_mysql.so: mach-o, but wrong architecture

非常感谢任何帮助。

0 个答案:

没有答案