[Tutor] Troubles with Python modules

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue May 17 22:26:09 CEST 2005


On Tue, 17 May 2005, Alberto Troiano wrote:


> I'm sending the errors MySQLdb gives me when I try to install it. It's
> hola.txt file
> I'm doing python setup.py build and inside hola.txt you can see what it says
> I have installed Linux Red Hat with ALL packages

Hi Alberto,


[Side note: please avoid using the plaintive '??????' in your questions.
it just reads in a way that feels like begging; you don't need to do
that.]

Red Hat's "Install All Packages" might not actually install all the
packages you need --- I suspect that it might not include developer
packages.  According to the error messages:

######
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes
-fPIC -I/usr/local/include/python2.3 -c _mysql.c -o
build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
_mysql.c:41:19: mysql.h: No such file or directory
######

the necessary MySQL header files can't be found in '/usr/include/mysql'.
You mentioned Red Hat 9, so you probably need to install something like
the 'mysql-devel-3.23.54a-11.i386.rpm' file.  Here is a link to a mirror
with that file:

ftp://ftp.linux.ncsu.edu/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/mysql-devel-3.23.54a-11.i386.rpm



> Can I add datetime module to Python 2.2.2?

You may find:

    http://www.egenix.com/files/python/mxDateTime.html

useful, although I can't confirm that it has the exact same API as the one
in the Standard Library.



More information about the Tutor mailing list