Menu

Eclipse PyDev Mac MySQLdb problem...

Help
Anonymous
2009-09-06
2012-09-19
  • Anonymous

    Anonymous - 2009-09-06

    From the command line, I can import MySQLdb just fine, but when I try to run the same code in eclipse using the PyDev plugin, I get:
    <code>
    ImportError: No module named MySQLdb
    </code>

    Simple example code that doesn't work is:
    <code>
    if name == 'main':
    import MySQLdb
    </code>
    I found someone suggesting adding it to the forced builtins, but I don't know what to add or it either doesn't work or doesn't work on Mac. Has anyone seen and fixed this problem or have any other ideas? Thanks!

     
    • Anonymous

      Anonymous - 2009-09-06

      The forum blew the tab before "import MySQLdb" in that example. It is correctly tabbed when I run it.

       
    • Kyle VanderBeek

      Kyle VanderBeek - 2009-09-08

      Sounds like you have an include path problem in PyDev. Run "print sys.path" from both environments and look for differences.

       

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.