MySqlDB Question - CompatMySqlDB is all I can find ?

Andy Todd andy47 at halfcooked.com
Thu Aug 21 08:30:23 EDT 2003


Richard Shea wrote:
> Hi - I've just downloaded mysqldb for 3.2. After running the install I
> find that I can't import mysqldb. When I looked in the directory
> mysqldb was installed into the only modules visible are 
> _mysql_exceptions.py and CompatMySqlDB.py. So i tried importing
> CompatMySqlDB and that works fine ...
> 
> 
>>>>import CompatMysqldb
>>>>import Mysqldb
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: No module named Mysqldb
> 
> 
> ...trouble is I read in this group that I'm not meant to be using
> CompatMysqldb so what am I doing/have done wrong ?
> 
> I got mysqldb as a binary from ...
> 
> http://ghaering.de/python/unsupported/MySQL-python.exe-0.9.2.win32-py2.3.exe
> 
> ... if anyone can throw some light on this I'd be grateful.
> 
> regards
> 
> richard shea.

Beware, but it looks like you have a typo. I'd suggest making sure you 
type the module name with the correct case (Python is case sensitive you 
know). From an interactive session on my machine;

"""
PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] 
on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - 
see 'Help/About PythonWin' for further copyright information.
 >>> import Mysqldb
Traceback (most recent call last):
   File "<interactive input>", line 1, in ?
ImportError: No module named Mysqldb
 >>> import MySQLdb
 >>> db=MySQLdb.connect()
"""

Regards,
Andy
-- 
--------------------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/







More information about the Python-list mailing list