I recently upgraded to OSx Mountain Lion (10.8) and shortly after to 10.8.1. I was attempting to do an "import MySQLdb" and ran into the following errors:
>>> import MySQLdb
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg/_mysql.pyc, but /Users/jlk/Software_Downloads/MySQL-python/MySQL-python-1.2.3 is being added to sys.path
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
File "build/bdist.macosx-10.8-intel/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.8-intel/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/jlk/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so, 2): no suitable image found. Did find:
/Users/jlk/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture
Not really sure what is wrong or how to fix it. I have googled around, but am unable to find any answers pertaining to osx 10.8.1 with this issue. It states at the end that its the "wrong architecture", but I know that what I have installed is the OSx version of the module. The only difference I see is that it says its for 10.8, but this is the most current version of the module.
For reference:
OS: OSx Mountain Lion 10.8.1 Pyhon version: 2.7.2
Any ideas?
Regards,
Jeff