Can't import modules

Peter Farrell peterfarrell66 at gmail.com
Sun Sep 30 21:35:50 EDT 2012


On Sunday, September 30, 2012 6:25:29 PM UTC-7, Steven D'Aprano wrote:
> On Sun, 30 Sep 2012 17:35:02 -0700, Peter Farrell wrote:
> 
> 
> 
> > Thanks for trying to help, everybody. Sorry I didn't post the whole
> 
> > error message. Now my problem is I just installed VPython and I'm trying
> 
> > to run the very first example, bounce.py which I located. I opened it
> 
> > and ran it in Idle. I got this message:
> 
> 
> 
> In general, any time you get unexpected or unusual errors in IDLE, you 
> 
> should try running the same code without IDLE, just at the regular Python 
> 
> prompt. Like all "Integrated Development Environments", IDLE sometimes 
> 
> messes about with things in the background that very occasionally 
> 
> interferes with the normal running of certain Python code, so it is 
> 
> always worth taken IDLE out of the picture whenever there is a mysterious 
> 
> failure. 
> 
> 
> 
> In Windows, I *think* that if you run "python" (or perhaps "python32") 
> 
> from the Start Menu, it will open an interactive prompt similar to IDLE. 
> 
> Once the Python interactive interpreter has launched, just enter:
> 
> 
> 
> from visual import *
> 
> 
> 
> and see if it works. If it fails, try:
> 
> 
> 
> import visual
> 
> 
> 
> 
> 
> My wild guess is that VPython (whatever that is!) only works under Python 
> 
> 2, not Python 3, but I could be wrong.
> 
> 
> 
> Other than that, my advice is to check with a dedicated VPython mailing 
> 
> list. Oh, and if you do find the solution, please consider reporting what 
> 
> the solution is back here, for the benefit of the next person who runs 
> 
> into this issue.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Steven

Thanks again for the help. I entered the import statements you suggested into the Python Shell and they gave me the same error message. (Neither did visual_all, but of course the print statement worked.)

Since I use Python 3.2.3 I've had trouble with programs and modules designed for Python 2 and many programs don't work on my 64-bit system.

I was hoping it was a common error that newbies encounter.

Thanks again, Python fans. I'll keep you posted on my progress!

Peter 



More information about the Python-list mailing list