Python mysql错误的架构mac os 10.8.3

时间:2013-03-16 20:44:03

标签: python mysql macos

为什么mysql python没有运行?

sudo ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build
sudo ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install

已安装好

使用python输出:

import MySQLdb
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-intel.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-intel.egg/_mysql.pyc, but /Users/kal1sha/Downloads/MySQL-python-1.2.3 is being added to sys.path
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "MySQLdb/__init__.py", line 19, in <module>
    import _mysql
  File "build/bdist.macosx-10.5-intel/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.5-intel/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/kal1sha/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.5-intel.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
    /Users/kal1sha/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.5-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture

0 个答案:

没有答案