can't import MySQldb on OS X

Alan Little contact at alanlittle.org
Wed Jun 25 17:46:32 EDT 2003


I can't import MySQLdb on OS X 10.2.6

Downloaded the package from sourceforge, got it to build after some
messing about with setup.py, and now I have _mysql.so and all its
little friends in /usr/lib/python2.2/site-packages

But still I get:


>>> import MySQLdb
Traceback (most recent call last):
  File "<input>", line 1, in ?
ImportError: No module named MySQLdb

... is there some python path variable I need to set? Or should python
look in site-packages by default?

Ah. After further investigation I realise I have two pythons
installed, 2.2 and MacPython 2.3a2. But neither of them can see the
MySQLdb module.




More information about the Python-list mailing list