No module named...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdamGr
    New Member
    • Jun 2008
    • 6

    No module named...

    I'm in the process of writing a program that connects to a MySQL database using the MySQLdb module. I got it installed, and my program worked perfectly....un til i logged off my Mac. When I logged back on, my program crashed at the outset with "No module named MySQLdb". Obviously there is a path variable or file somewhere that got reset, but I don't know where python looks for its modules. Any help?

    Thanks,
    Adam
  • AdamGr
    New Member
    • Jun 2008
    • 6

    #2
    O_o never mind, I tried running the program 5 times in a row and the fifth time it ran fine, and didn't give me an error. FSM help me...

    Comment

    • jlm699
      Contributor
      • Jul 2007
      • 314

      #3
      [code=python]
      import sys
      sys.path
      [/code]
      That'll show you the path that Python is using for modules... In case you are using custom modules that aren't on the path you can always use
      sys.path.append ( <path> )
      To add onto it!

      Comment

      Working...