Re: MySQLdb on Intel Mac
Posted by:
Brent Nash
Date: January 29, 2008 12:08PM
Having a similar problem and I didn't quite understand the previous explanations. There's no MAMP installation involved, I'm just using Python 2.5.1 on an Intel Mac and I'm attempting to install the Python MySQLdb module version 1.2.2.
After running the installation instructions with the Python MySQLdb module, I get this message when I attempt to import:
mac07284070204:~/Documents/workspace/chill_gds_svn clark$ python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] 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.3-fat/egg/MySQLdb/__init__.py", line 19, in <module>
File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/clark/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg-tmp/_mysql.so, 2): Symbol not found: _mysql_get_host_info
Referenced from: /Users/clark/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg-tmp/_mysql.so
Expected in: dynamic lookup
Is the previous conversation about making a symlink to mysql.sock really the solution to this? I've tried a few different things I've picked up in this thread , but to no avail.
Strangely enough, I followed the same procedure on another Intel Mac and aside from having to make a symlink for /usr/local/mysql/lib (as outlined later in this thread), everything works fine.
Does anyone have any further advice? Thanks for your time/help!