I'm using RedHat E9, which came with mysql-3.23.58-1 & python-2.2.3-5 installed. I installed python2.3-2.3.4-2 which was placed in it's own location and can be called using python2.3 script.py.
I tried the MySQL-python-0.9.2-1 RPM and it installs fine. But when I try to import MySQLdb I get the following message:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "MySQLdb/__init__.py", line 27, in ?
import _mysql
ImportError: No module named _mysql
So, I attempted to install the tarball then received the following message:
error: command 'gcc' failed with exit status 1
I looked through setup.py and everything appears ok.. any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using RedHat E9, which came with mysql-3.23.58-1 & python-2.2.3-5 installed. I installed python2.3-2.3.4-2 which was placed in it's own location and can be called using python2.3 script.py.
I tried the MySQL-python-0.9.2-1 RPM and it installs fine. But when I try to import MySQLdb I get the following message:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "MySQLdb/__init__.py", line 27, in ?
import _mysql
ImportError: No module named _mysql
So, I attempted to install the tarball then received the following message:
error: command 'gcc' failed with exit status 1
I looked through setup.py and everything appears ok.. any ideas?
There are no MySQL-python RPMs for Python-2.3, at least not on this site.
Please get the MySQL-python-1.0.0 source tarball (.tar.gz) and install it like this:
rpm -ta MySQL-python-1.0.0.tar.gz
rpm -i /usr/src/redhat/RPMS/i386/MySQL-python-1.0.0-1.i386.rpm
Paths may vary. Especially read README which comes in the tarball or you can read here:
http://cvs.sourceforge.net/viewcvs.py/mysql-python/MySQLdb/README?rev=1.6.2.1&only_with_tag=branch-1-0&view=auto
It tells you exactly what you need to have installed to do this.
I tried:
rpm -ta MySQL-python-1.0.0.tar.gz
on a REDHAT 8 OS and I get:
-ta: unknown option
What could be the problem?
Thanks
Rodrigo
Try unpacking the tarball, and reading the instructions in the README file.