It seems to be looking for the MySQL libs in /usr/local/mysqli/lib. See what
this produces:
$ which mysql_config
$ mysql_config --libs
Is it possible also that you had a version of MySQL installed in /usr/local at
one time (or still do)? You might want to put MAMP earlier in your $PATH.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to setup MySQLdb but mysql is located @
/Applications/MAMP/Library/bin/mysql because of the installation of MAPI.
My .profile has: export
PATH="/usr/local/bin:/usr/local/sbin:/Applications/MAMP/Library/bin:$PATH"
The 'python 'setup.py build' and
' sudo python setup.py install' cmds seem to go as expected but I get this
when attempting to import it.
python manage.py shell
Python 2.6.1 (r261:67515, Jul 9 2009, 14:20:26)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
Traceback (most recent call last):
File "<console>", line 1, in <module></module></console>
File "/Library/Python/2.6/site-packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6
-universal.egg/MySQLdb/init.py", line 19, in <module></module>
File "/Library/Python/2.6/site-
packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg/_mysql.py", line
7, in <module></module>
File "/Library/Python/2.6/site-
packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg/_mysql.py", line
6, in bootstrap
ImportError: dlopen(/Users/donfox1/.python-
eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2):
Library not loaded: /usr/local/mysql/lib/libmysqlclient_r.16.dylib
Referenced from: /Users/donfox1/.python-
eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so
Reason: image not found
Does anyone know a fix?
Thanks
Don Fox
It seems to be looking for the MySQL libs in /usr/local/mysqli/lib. See what
this produces:
$ which mysql_config
$ mysql_config --libs
Is it possible also that you had a version of MySQL installed in /usr/local at
one time (or still do)? You might want to put MAMP earlier in your $PATH.