Re: Is there anyway to uninstall vPython?

Martin Costabel <[email protected]> Sun, 26 Aug 2012 23:31:38 +0200
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
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



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/