[Tutor] [OT] MySQLdb on Redhat 9

Justin Heath justin@unixremedies.com
Mon Jul 28 10:48:15 2003


tpc@csua.berkeley.edu wrote:

>hello, I was wondering if anyone has tried to install MySQLdb on Redhat
>Linux 9.  I just installed the module and it was fine:
>
>[root@nike download]# rpm -ivh MySQL-python-0.9.2-1.i386.rpm
>warning: MySQL-python-0.9.2-1.i386.rpm: V3 DSA signature: NOKEY, key ID
>930b8ab6
>Preparing...                ###########################################
>[100%]
>   1:MySQL-python           ###########################################
>[100%]
>
>though now when I try to run a python script that imports MySQLdb it says
>"ImportError: No module named MySQLdb".
>
>It is strange because rpm -qa | grep MySQL shows:
>
>[root@nike local]# rpm -qa | grep MySQL
>perl-DBD-MySQL-2.1021-3
>MySQL-python-0.9.2-1
>MySQL-shared-3.23.56-1.0.23
>MySQL-client-4.0.14-0
>MySQL-server-4.0.14-0
>
>although when I try to find MySQLdb.py I cannot.
>
>
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor
>  
>
I am using RedHat 9 and installed this module and it works fine. I did 
have an error because my case did not match the module name (oops). 
Running the following worked for me:

 > up2date MySQL-python
 > python
 >>> import MySQLdb

Also, just FYI the README and FAQ files are located in 
/usr/share/doc/MySQL-python-0.9.1.

Hope that helps,
Justin