Can't import the module

118 views
Skip to first unread message

AugustoDRA

unread,
Dec 16, 2016, 8:51:03 PM12/16/16
to VPython-users
In every file I see that uses it, vPython is imported as "visual", but when I try to do it the shell returns and error.
I downloaded it through pip, if that helps in any way.

Thanks in advance.
Message has been deleted

Bruce Sherwood

unread,
Dec 16, 2016, 10:40:11 PM12/16/16
to VPython-users
I'm not sure, but it sounds like maybe you are mixing Classic VPython with Jupyter VPython.

See vpython.org for details. There are three versions of VPython: 

1) Classic VPython is no longer under development. It is installed using instructions in the "Download" pages at vpython.org and involves installing Python 2.7, then installing the visual module, and if on a Mac, installing an update to Tcl. Classic VPython is invoked by importing "visual".

2) Jupyter VPython requires use of the Jupyter notebook. The easiest installation is to install Anaconda, then use pip to install the vpython module. Jupyter VPython is invoked by importing "vpython". On the first page of vpython.org there is a link to a zip file of example programs in the form of Jupyter notebooks.

3) GlowScript VPython is available at glowscript.org. Compilation and execution are performed in your browser; no installation is required.

The Jupyter and GlowScript versions both use the GlowScript GPU-based graphics library to render the 3D animations, using WebGL.
Reply all
Reply to author
Forward
0 new messages