Can't import modules
Dave Angel
d at davea.name
Sun Sep 30 21:16:30 EDT 2012
On 09/30/2012 08:35 PM, Peter Farrell wrote:
You top-posted, which means there's no context; the message is now out
of order. Please put your responses after the parts you're quoting, or
don't bother quoting.
> 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:
>
> Traceback (most recent call last):
> File "C:\Python32\Lib\site-packages\visual\examples\bounce.py", line 1, in <module>
> from visual import *
> File "C:\Python32\lib\site-packages\visual\__init__.py", line 1, in <module>
> from .visual_all import *
> File "C:\Python32\lib\site-packages\visual\visual_all.py", line 1, in <module>
> from vis import version
> File "C:\Python32\lib\site-packages\vis\__init__.py", line 3, in <module>
> from .cvisual import (vector, dot, mag, mag2, norm, cross, rotate,
> SystemError: initialization of cvisual raised unreported exception
That's a different error message than you reported at first. If you
can't even run an example supplied with the system, you'd better post a
question on the vpython forum (I presume it's available from
http://vpython.wikidot.com/system:join) Presumably the install program
is broken. Or maybe you just can't run visual from IDLE. Try running
from the terminal prompt.
I'm amazed that it uses the form: from visual_all import *
That's considered bad form. Still, it's probably not the problem. What
happens if you write a two line program:
import visual_all
print("Import succeeded")
> I'm not a programmer, just a math teacher/tutor who's trying to teach my students to understand math through using something real like Python. I'll keep you posted on my progress.
>
> Thank you in advance for your help!
>
>
--
DaveA
More information about the Python-list
mailing list