I've installed mysql-python package by doing
sudo python setup.py build
sudo python setup.py install
I'm getting ImportError with the below error message when I try to import
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 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/abhinay/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Symbol not found: _mysql_affected_rows
Referenced from: /Users/abhinay/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so
Expected in: flat namespace
Server version: 5.1.41 Source distribution
I am experiencing what looks like the same problem:
eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no
suitable image found. Did find:
tmp/_mysql.so: mach-o, but wrong architecture
A little more searching turned up the this
The payoff is the suggestion to put this command in the .profile:
I tried it, and the ImportEror message disappeared. Failure now occurs later
in the process, but progress nevertheles.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.