From: M H. <air...@ho...> - 2012-08-26 20:01:42
|
I had at first tried it with lowercase 'b' on box and it kicked back the same error. As far as vPython for 32bit, I downloaded the 64bit version from the link provided on the vPython page. Maybe there is something wrong with prebuilt version of vPython for 64bit? I'd like to reinstall the 32bit version , but I'm unsure of what to delete from my Python libraries. It would appear that vPython installed into more directories than just the Lib/site-packages/visual and can even see references to other directories in the error message that I had previously posted, such as lib (with lowercase 'L'). I don't want to uninstall my Python distro either, as I had to pull teeth in order to install/build other libraries. Does anyone have any idea of how I can remove all vPython packages? Thanks... > Date: Sun, 26 Aug 2012 12:10:52 -0700 > Subject: Re: [Visualpython-users] Is there anyway to uninstall vPython? > From: kir...@gm... > To: air...@ho... > CC: vis...@li... > > On Sun, Aug 26, 2012 at 11:48 AM, M Hartman <air...@ho...> wrote: > > That's what I'm using is PyCharm and it seems to be so much better than > > Eclipse/PyDev, at least for a beginner. Anyway, is that the whole library in > > /Lib/site-packages/visual? Does it install anything somewhere else? Also, I > > see the visual directory but for some reason, I cannot import anything from > > this directory, as I get errors in PyCharms built-in console. This is the > > particular error: > > > > Traceback (most recent call last): > > File "C:/Users/airspoon/PycharmProjects/goo/vis.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:\Users\airspoon\PycharmProjects\goo\vis.py", line 3, in <module> > > floor = Box (pos=(0,0,0), length=4, height=0.5, width=4, > > color=color.blue) > > NameError: name 'Box' is not defined > > > > > > This is what I get when I copy and paste the 'bouncing ball' example from > > the vPython website. Isn't that telling me that it can't import anything > > from the visual library? > > > > Thanks for the help > > > > In my version of bounce.py, Box is lowercase: > > from visual import * > > floor = box(length=4, height=0.5, width=4, color=color.blue) > > ball = sphere(pos=(0,4,0), color=color.red) > ball.velocity = vector(0,-1,0) > > dt = 0.01 > while 1: > rate(100) > ball.pos = ball.pos + ball.velocity*dt > if ball.y < 1: > ball.velocity.y = -ball.velocity.y > else: > ball.velocity.y = ball.velocity.y - 9.8*dt > > There is not Box I don't think: > > >>> from visual import Box > Traceback (most recent call last): > File "<pyshell#0>", line 1 > from visual import Box > ImportError: cannot import name Box > > > Kirby |