0

I have been struggling with this for days. Installing / uninstalling / starting over.

I am attempting to get python working with the mysql with MAMP and have followed many tutorials but it seems that I constantly get to this point where I am testing the import MySQLdb module.

Below is the error I receive. Any advice on how to continue?

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.5-intel.egg/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.5-intel.egg/_mysql.so, 2): Library not loaded: libmysqlclient.16.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.5-intel.egg/_mysql.so
  Reason: image not found
Blender
  • 289,723
  • 53
  • 439
  • 496
Alex
  • 542
  • 5
  • 24
  • 1
    Try this fix and see if it works: http://stackoverflow.com/questions/4546698/library-not-loaded-libmysqlclient-16-dylib-error-when-trying-to-run-rails-serv – Blender Apr 18 '13 at 02:11
  • This is what I got after trying that solution: ln: /usr/lib/libmysqlclient.18.dylib: File exists – Alex Apr 18 '13 at 02:14
  • 1
    Even this one? http://stackoverflow.com/a/8304262/464744 – Blender Apr 18 '13 at 02:15
  • That did it! Thank you! Looks like everything is importing fine now... finally – Alex Apr 18 '13 at 02:17

0 Answers0