Answer the question
In order to leave comments, you need to log in
Python mysql wrong architecture mac os 10.8.3?
Guys need help, python mysql won't start even though everything installed smoothly:
sudo ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build
sudo ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install
Installed OK
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/root/Downloads/MySQL-python-1.2.3 is being added to sys.path
Traceback (most recent call last):
File “”, line 1, in File “MySQLdb/__init__.py”, line 19, in import _mysql
File “build/bdist.macosx-10.5-intel/egg/_mysql.py”, line 7, in File “build/bdist.macosx-10.5-intel/egg/_mysql.py”, line 6, in __bootstrap__
ImportError: dlopen (/Users/root/.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/root/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.5-intel.egg-tmp/_mysql.so: mach-o, but wrong
architecture
Answer the question
In order to leave comments, you need to log in
I would remove "-arch i386".
And how was it compiled from MySQL? What does "otool -fv <libmysqlclient*.dylib>" say? The client from mysql can be launched at all?
And why does the site-packages path say "macosx-10.5"? Is this some old way? Maybe just clean and reinstall?
According to the traceback, it is clear that you mysql
somehow installed in ~/Downloads
and in the hidden ~/.python-eggs
, and at the same time in a more predictable /Library/Python/2.7/site-packages/
. Try to remove these first folders here (maybe temporary).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question