Python & MySQL - import MySQLdb error
I've just installed the MySQL python API. The only unusual thing I had to do during installation was to change the import_dirs parameter in the site.cfg config file from %(mysql_root)s/include to %(mysql_root)s/include/mysql (this probably wont be relevant to my problem, but I thought it was worth including).
When I try to run in the python environment I get the error
So the error crops up when __init__.py tries to import _mysql. I therefore tried to import _mysql manually, and (as you'd expect) got the same error but without the line
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 19, in ? import _mysql
ImportError: /usr/lib/python2.4/site-packages/_mysql.so: undefined symbol: mysql_set_character_set
I don't really know what to try now, as this unfortunately isn't one of the import errors mentioned in the projects FAQ, and neither google or the forum search seems to have anything on this error.
Thanks for taking the time to look at this
Facing same problem on linux fedora
may i get some help how to solve this problem,
thanks in advance
Originally Posted by Giles
true, my post is related to redhat, but...
probably instead of the RPM with the libraries you could get the targz files, unpack them and use... What do you use? Mandriva and Slackware? I don't see anything specific for those, so probably you'll use one of the non-rpm packages for generic linux or you could install an rpm program for your linux and use it.
frankly not sure how well they work. All you need from that rpm is just the libmysqlclient... so files.