【发布时间】:2011-07-28 18:23:14
【问题描述】:
我花了几个小时尝试在 Mac OS X Snow Leopard 上安装 MySQLdb(Python 库)。我正在使用来自 SO 的these instructions。我不断收到错误,因此我尝试使用 MacPorts(作为该问题的答案之一),但我继续收到相同的错误。有人可以帮忙吗?
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/josephmornin/.python-egg-cache/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found.
Did find:
/Users/josephmornin/.python-egg-cache/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture
【问题讨论】:
-
试过 ActivePython? code.activestate.com/pypm/mysql-python
标签: python mysql macos mysql-python