Can't import modules
d at davea.name
Mon Oct 1 05:18:01 CEST 2012
On 09/30/2012 09:35 PM, Peter Farrell wrote:
> 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
> 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.)
Don't run it in the Python Shell, and don't use IDLE at all. Run your
test either at the cmd window, or from plain Python's interactive
interpreter, or maybe from VIDLE.
>From the official download page:
"""How to run VPython
Start the program editor with the "VIDLE for Python" shortcut on the
or on the Start menu.
Open an example program -- for example, bounce2.py.
Press F5 to run (or use the Run menu).
> 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!
VPython has separate versions for Python 2.7 and 3.2 Hopefully you
downloaded the 3.2 version, since you're running it in c:\python32
Also, these are for the 32bit version of CPython. So double-check which
one you've got installed.
More information about the Python-list