can't import MySQldb on OS X

Discussion in 'Python' started by Alan Little, Jun 25, 2003.

  1. Alan Little

    Alan Little Guest

    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.
    Alan Little, Jun 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Opal
    Replies:
    12
    Views:
    940
    Paul Opal
    Oct 11, 2004
  2. Michael Boldin via alt email

    IDLE & MySQLdb import error

    Michael Boldin via alt email, Mar 4, 2007, in forum: Python
    Replies:
    0
    Views:
    562
    Michael Boldin via alt email
    Mar 4, 2007
  3. Diez B. Roggisch

    Re: MySQLdb will only import for root

    Diez B. Roggisch, Jul 11, 2008, in forum: Python
    Replies:
    3
    Views:
    298
    Peter Otten
    Jul 12, 2008
  4. Kurian Thayil

    MySQLdb compiled -- Import issue

    Kurian Thayil, Mar 25, 2010, in forum: Python
    Replies:
    3
    Views:
    474
    Sean DiZazzo
    Mar 25, 2010
  5. Stéphane Klein
    Replies:
    0
    Views:
    267
    Stéphane Klein
    Jul 5, 2011
Loading...

Share This Page