PDA

View Full Version : Python Error "ImportError: No Module Named.."




Prof Rod Coates
Nov 2, 2007, 05:27 AM
Although I have been using Macs for a quarter of a century and was doing scientific programming in the '60's I am VERY new to Python on the Mac. I have been writing some very simple applications and running them using IDLE. To start with the applications worked OK. However,as time has progressed, the error message "ImportError: No module named ****" has been generated. For example, I create a small file called MiniLibrary.py and save it to the desktop. I type at the >>> prompt, in the terminal window import MiniLibrary. At one time this would have generated a new file MiniLibrary.pyc on the desktop and returned a new prompt >>>. No longer. Now the error message "ImportError: No module named MiniLibrary". Further information: I am running Python 2.5.1. The computer is a Dual G5 Power PC running OSX 10.4.10. Can anyone help? I am at my wits end and quietly contemplating giving up all attempts at scientific programming on a Mac.