Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30581

Re: Can't import modules

Date 2012-09-30 21:16 -0400
From Dave Angel <d@davea.name>
Subject Re: Can't import modules
References <36813ff7-68b9-44eb-9b25-7c13ae739566@googlegroups.com> <5068a9e0$0$6915$e4fe514c@news2.news.xs4all.nl> <2e36e097-a43f-43b4-98a6-8da999c39c21@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.1688.1349054275.27098.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Can't import modules Peter Farrell <peterfarrell66@gmail.com> - 2012-09-30 12:42 -0700
  Re: Can't import modules Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-09-30 13:15 -0700
  Re: Can't import modules Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 20:21 +0000
  Re: Can't import modules Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 20:21 +0000
  Re: Can't import modules Hans Mulder <hansmu@xs4all.nl> - 2012-09-30 22:21 +0200
    Re: Can't import modules Peter Farrell <peterfarrell66@gmail.com> - 2012-09-30 17:35 -0700
      Re: Can't import modules Dave Angel <d@davea.name> - 2012-09-30 21:16 -0400
      Re: Can't import modules Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-01 01:25 +0000
        Re: Can't import modules Peter Farrell <peterfarrell66@gmail.com> - 2012-09-30 18:35 -0700
          Re: Can't import modules Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-01 02:15 +0000
          Re: Can't import modules Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-01 02:15 +0000
            Re: Can't import modules Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-30 22:39 -0400
            Re: Can't import modules Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-30 22:48 -0400
            Re: Can't import modules Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-30 23:12 -0400
          Re: Can't import modules Dave Angel <d@davea.name> - 2012-09-30 23:18 -0400
            Re: Can't import modules Peter Farrell <peterfarrell66@gmail.com> - 2012-09-30 21:44 -0700
            Re: Can't import modules Peter Farrell <peterfarrell66@gmail.com> - 2012-09-30 21:44 -0700
        Re: Can't import modules Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-01 09:36 +0100
      Re: Can't import modules cjgohlke@gmail.com - 2012-09-30 23:10 -0700

csiph-web