Menu

ImportError ImmutableSet

Help
2006-05-23
2012-09-19
  • Mathieu Drapeau

    Mathieu Drapeau - 2006-05-23

    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

     
    • Andy Dustman

      Andy Dustman - 2006-05-23

      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.

       
      • Mathieu Drapeau

        Mathieu Drapeau - 2006-05-23

        Thanks,
        it works not! :)

        Mathieu

         
        • Andy Dustman

          Andy Dustman - 2006-05-23

          I hope you mean "now" instead of "not"...

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.