Hi.
I've installed mysqldb and now when I import it, I got this error:
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/MySQLdb/init.py", line 34, in ?
from sets import ImmutableSet
ImportError: cannot import name ImmutableSet
But when I try to import the ImmutableSet by itself, it works.
>>> from sets import ImmutableSet
>>>
I think, the output error is wrong.
Thanks,
Mathieu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you originally have 1.2.0 and then upgrade to 1.2.1? MySQLdb-1.2.0 had it's own sets module which predated the Python-2.3 sets module. In 1.2.1, Python-2.3 became the required version, so the sets module was removed. If you did an upgrade, the old sets module is probably still there. distutils unfortunately does not have the concept of upgrade, so obsolete files are not removed. Get rid of /usr/lib64/python2.4/site-packages/MySQLdb/sets.py* and try again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I've installed mysqldb and now when I import it, I got this error:
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/MySQLdb/init.py", line 34, in ?
from sets import ImmutableSet
ImportError: cannot import name ImmutableSet
But when I try to import the ImmutableSet by itself, it works.
>>> from sets import ImmutableSet
>>>
I think, the output error is wrong.
Thanks,
Mathieu
Did you originally have 1.2.0 and then upgrade to 1.2.1? MySQLdb-1.2.0 had it's own sets module which predated the Python-2.3 sets module. In 1.2.1, Python-2.3 became the required version, so the sets module was removed. If you did an upgrade, the old sets module is probably still there. distutils unfortunately does not have the concept of upgrade, so obsolete files are not removed. Get rid of /usr/lib64/python2.4/site-packages/MySQLdb/sets.py* and try again.
Thanks,
it works not! :)
Mathieu
I hope you mean "now" instead of "not"...