D
D
Dmitry Kalinin2013-03-17 00:00:09
Python
Dmitry Kalinin, 2013-03-17 00:00:09

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

4 answer(s)
D
dgeliko, 2013-03-17
@dgeliko

Try digging here

N
nochkin, 2013-03-18
@nochkin

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?

M
MikhailEdoshin, 2013-03-18
@MikhailEdoshin

According to the traceback, it is clear that you mysqlsomehow installed in ~/Downloadsand 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).

M
Mel, 2013-03-18
@Mel

Try installing mysql server from brew and then MySQLdb from pip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question