Menu

python 2.6 mysql import error

dgc1963
2009-07-09
2012-09-19
  • dgc1963

    dgc1963 - 2009-07-09

    Hi.

    I am wondering if anyone has any experience with this...

    O/S = Fedora Core 11

    [dennis@denniswork site-packages]$ python
    Python 2.6 (r26:66714, Jun 8 2009, 16:07:26)
    [GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import MySQLdb
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "MySQLdb/init.py", line 19, in <module>
    import _mysql
    File "_mysql.py", line 9, in <module>
    bootstrap()
    File "_mysql.py", line 8, in bootstrap
    imp.load_dynamic(name,file)
    ImportError: ./_mysql.pyd: invalid ELF header
    >>>

     
    • Andy Dustman

      Andy Dustman - 2009-07-09

      Um, isn't .pyd a Windows dynamic module? Why do you have a _mysql.py? You should have _mysql.so on POSIX platforms.

       
      • dgc1963

        dgc1963 - 2009-07-09

        Well, there you go then.

        Despite my embarrassment, I am glad I asked that question. Downloaded the correct tar.gz and all installed correctly. And I am a little wiser.

        Thanks for the quick response.

        DGC

         

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.