From: M H. <air...@ho...> - 2012-08-26 16:25:33
|
Hello, I recently installed vPython using the installer for Windows 7 64bit (Python 3.2) and I noticed that it didn't put a link on my desktop for VIDLE. So, I thought that I'd try the bouncing ball example from the vPython library in my favorite editor and it simply doesn't work. I get error messages over the very first 'from visual import *' (and just about everything else). I'm not sure what's going on but I'd like to somehow remove vPython and I can't find a clear way to do that, without uninstalling my whole Python distribution. Is there anyway to just get rid of the vPython while keeping the Python distro that it installed into? Thanks. |
From: kirby u. <kir...@gm...> - 2012-08-26 17:13:13
|
On Sun, Aug 26, 2012 at 9:25 AM, M Hartman <air...@ho...> wrote: > Hello, I recently installed vPython using the installer for Windows 7 64bit > (Python 3.2) and I noticed that it didn't put a link on my desktop for > VIDLE. So, I thought that I'd try the bouncing ball example from the vPython > library in my favorite editor and it simply doesn't work. I get error > messages over the very first 'from visual import *' (and just about > everything else). I'm not sure what's going on but I'd like to somehow > remove vPython and I can't find a clear way to do that, without uninstalling > my whole Python distribution. Is there anyway to just get rid of the vPython > while keeping the Python distro that it installed into? Thanks. > I'm pretty sure it installs almost everything in your python32/Lib/site-packages/visual directory and you can just drag and drop that into your trash or however you prefer to delete file trees. Is there a DLL that goes somewhere? Shouldn't matter much. As it so happens, I just installed 32bit Python 3.2 with Visual on WinXP yesterday. I wanted to see of the editor PyCharm from JetBrains, which many are gravitating towards ($29 for academic license), would handle visual programs without hiccups. So far so good. Ideally, visual could be adding to an existing virtualenv with pip install vpython but that didn't work, nor pip install visual. But may it should be broken down into step with pip install numpy separate. http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ shows the kind of install process that visual could be a part of if there were a pip install way to get it. I recommend that if you try with Win7 again, you learn about virtualenv and how to install visual in just one of your many virtual Python environments. It's a way to isolate importables and dependencies. Kirby |
From: M H. <air...@ho...> - 2012-08-26 18:48:54
|
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 > Date: Sun, 26 Aug 2012 10:13:02 -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 9:25 AM, M Hartman <air...@ho...> wrote: > > Hello, I recently installed vPython using the installer for Windows 7 64bit > > (Python 3.2) and I noticed that it didn't put a link on my desktop for > > VIDLE. So, I thought that I'd try the bouncing ball example from the vPython > > library in my favorite editor and it simply doesn't work. I get error > > messages over the very first 'from visual import *' (and just about > > everything else). I'm not sure what's going on but I'd like to somehow > > remove vPython and I can't find a clear way to do that, without uninstalling > > my whole Python distribution. Is there anyway to just get rid of the vPython > > while keeping the Python distro that it installed into? Thanks. > > > > I'm pretty sure it installs almost everything in your > python32/Lib/site-packages/visual directory and you > can just drag and drop that into your trash or however > you prefer to delete file trees. Is there a DLL that > goes somewhere? Shouldn't matter much. > > As it so happens, I just installed 32bit Python 3.2 > with Visual on WinXP yesterday. I wanted to see > of the editor PyCharm from JetBrains, which many > are gravitating towards ($29 for academic license), > would handle visual programs without hiccups. So > far so good. > > Ideally, visual could be adding to an existing > virtualenv with pip install vpython but that didn't > work, nor pip install visual. But may it should be > broken down into step with pip install numpy > separate. > > http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ > > shows the kind of install process that visual could > be a part of if there were a pip install way to get it. > > I recommend that if you try with Win7 again, you > learn about virtualenv and how to install visual in just > one of your many virtual Python environments. It's > a way to isolate importables and dependencies. > > Kirby |
From: kirby u. <kir...@gm...> - 2012-08-26 19:10:59
|
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 |
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 |
From: Martin C. <cos...@wa...> - 2012-08-26 21:31:46
|
On 26/08/12 20:48, M Hartman 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> Is "vis.py" the name of your program? As it appears, this is a bad idea, because vpython has a module named "vis" (in .../site-packages/vis/). This can lead to confusion. > 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> Here is the confusion. Instead of importing the "vis" module, which defines box, it opens your vis.py. Box is then undefined. > floor = Box (pos=(0,0,0), length=4, height=0.5, width=4, > color=color.blue) > NameError: name 'Box' is not defined -- Martin |
From: kirby u. <kir...@gm...> - 2012-08-26 21:35:02
|
Yeah sounds like some bad luck in terms of namespace collisions. They're still quite possible. I'm deep into PyCharm / virtualenv issues (or maybe it's just that I'm not deep enough), but none seem to involve VPython, other than the fact it's sad there's no pip install route (or at least I couldn't find it). Kirby |
From: M H. <air...@ho...> - 2012-08-27 00:01:01
|
First, thanks for the help. I was kind of excited to see that their was a namespace conflict, ultimately thinking it would be an easy fix. So, I renamed the file to something more obscure and and tried to run through PyCharm again (I actually created a new file, copied and pasted, then deleted the vis.py- rather than just renaming the file). At least I'm getting somewhere, as the error is different, lol. This is the error that I got: C:\Python32\python.exe C:/Users/airspoon/PycharmProjects/goo/vp002.pyImportError: numpy.core.multiarray failed to importTraceback (most recent call last): File "C:/Users/airspoon/PycharmProjects/goo/vp002.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 And for what it's worth, this is the code that was copied and pasted from the vPython website: from visual import * floor = box (pos=(0,0,0), length=4, height=0.5, width=4, color=color.blue)ball = sphere (pos=(0,4,0), radius=1, 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 < ball.radius: ball.velocity.y = abs(ball.velocity.y) else: ball.velocity.y = ball.velocity.y - 9.8*dt All other 3rd party libraries that I've used with Python seem to be working correctly, so I doubt the issue is with my Python distro. Can anyone make sense of those error messages? Again, thanks for all of the help. > Date: Sun, 26 Aug 2012 14:34:55 -0700 > Subject: Re: [Visualpython-users] Is there anyway to uninstall vPython? > From: kir...@gm... > To: cos...@wa... > CC: air...@ho...; vis...@li... > > Yeah sounds like some bad luck in terms of namespace collisions. > They're still quite possible. > > I'm deep into PyCharm / virtualenv issues (or maybe it's just that I'm > not deep enough), but none seem to involve VPython, other than the > fact it's sad there's no pip install route (or at least I couldn't > find it). > > Kirby |
From: kirby u. <kir...@gm...> - 2012-08-27 02:55:19
|
On Sun, Aug 26, 2012 at 5:00 PM, M Hartman <air...@ho...> wrote: > First, thanks for the help. I was kind of excited to see that their was a > namespace conflict, ultimately thinking it would be an easy fix. So, I > renamed the file to something more obscure and and tried to run through > PyCharm again (I actually created a new file, copied and pasted, then > deleted the vis.py- rather than just renaming the file). At least I'm > getting somewhere, as the error is different, lol. This is the error that I > got: > > C:\Python32\python.exe C:/Users/airspoon/PycharmProjects/goo/vp002.py > ImportError: numpy.core.multiarray failed to import Ouch, looks numpy related. Since you're doing 64bit stuff, I'm somewhat at the limit of my own experience, as I'm using WinXP -- sent the Win7 laptop off to college with my daughter. I wish you success. Kirby |