Running OSX 10.6.3
Just updated python to Python 2.6.5 (r265:79359
rebuilt and reinstalled mysqldb (MySQL-python-1.2.3)
rebuilt and reinstalled django (<– should be unrelated. problem seems to be with mysqldb)
I’m getting the following error.
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/joshuamerriam/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.3-fat.egg-tmp/_mysql.so, 2): Symbol not found: _mysql_affected_rows
Referenced from: /Users/joshuamerriam/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.3-fat.egg-tmp/_mysql.so
Expected in: dynamic lookup
The error is mentioned here (http://mysql-python.sourceforge.net/FAQ.html) but with no reference as to how to fix it. I’m a bit over my head. Any help?
Since you have already gone done the road of using MacPorts for the MySQL client library, the easiest and least trouble-prone solution long-term is to use as many other components from MacPorts as possible. That is, use python and the the MySQLdb from MacPorts as well. There’s even a Django port available. One tip: on Snow Leopard, the MacPorts Python 2.6 Tkinter pulls in a lot of extra ports that you may not want to bother building. If you don’t anticipate needing Tkinter, you can skip building it:
You may also want to install the
python_selectport and use it to select the default for the/opt/local/bin/pythoncommand:You’ll need to ensure your shell PATH includes the MacPorts
binand Python frameworkbindirectories: