Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > can't import MySQldb on OS X

Reply
Thread Tools

can't import MySQldb on OS X

 
 
Alan Little
Guest
Posts: n/a
 
      06-25-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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQLdb compiled -- Import issue Kurian Thayil Python 3 03-25-2010 03:54 AM
Re: MySQLdb will only import for root Diez B. Roggisch Python 3 07-12-2008 06:24 AM
IDLE & MySQLdb import error Michael Boldin via alt email Python 0 03-04-2007 02:26 PM
to use import java.lang.* or import java.lang.Math or none at all? JPractitioner Java 13 02-24-2006 08:48 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM



Advertisments