New in VPython 6

Recent developments

VPython wiki

User forum

Contributed programs

For developers

Python web site


Windows Downloads

Downloads provided by sourceforge.net

Windows downloads for VPython 6

If you have an old VPython 6.x installed, it's a good idea to uninstall it before installing the new VPython 6.10. Go to Control Panel > Uninstall a program and select the old VPython.

A version that works on all Windows computers:
   First, download and install the 32-bit Python-2.7.6 from python.org
      Be sure to allow the installer to install into C:\Python27.
   Second, install VPython-Win-32-Py2.7-6.10
      This version of VPython requires Python 2.7.x from python.org; it will not work with       versions of Python other than the one from python.org.

A version that requires a 64-bit Windows computer:
   First, download and install the 64-bit Python-2.7.6 from python.org
      Be sure to allow the installer to install into C:\Python27.
   Second, install VPython-Win-64-Py2.7-6.10
      This version of VPython requires Python 2.7.x from python.org; it will not work with       versions of Python other than the one from python.org.

There is an older VPython 5.74 for Python 3.2.

How to run VPython

  • Start the program editor with the "VIDLE for Python" shortcut on the desktop
       or on the Start menu. Do not use the Python IDLE editor with VPython 6.

  • On the File menu choose Open and choose an example program -- for example, bounce2.py.

  • Press F5 to run (or use the Run menu).

  • Every time you run, your files are automatically saved (if you have changed them).

  • Choose VPython on the Help menu for documentation.

  • Ctrl button or right button drag to rotate the "camera" to view a 3D scene.
    Alt button or middle button to drag up or down to zoom in or out.
       On a two-button mouse, middle is left + right.

Compatibility with the future and the past

We encourage you to place the following statement at the start of your programs, in order that your program will run not only on Python 2.7 today, but also will run in the future on the newer Python 3.x series. Note the double underscore before "future" and the double underscore after "future".

from __future__ import print_function, division

For Python 2.7, this statement invokes the new Python 3.x print format, namely "print(x)" instead of the old "print x", and the new division scheme, namely that 3/4 is 0.75, not zero as in the past. This statement is ignored by Python 3.x.

Changes from VPython 5: With VPython 6 you must include a rate statement in animation loops, and you must import visual or vis before importing graph or controls or filedialog.

Conditions of use

The Polygon module distributed with VPython may not be used except with VPython. Here's why:

In support of the text and extrusion objects, the Windows installer includes some modules that include Polygon, for which the following conditions apply: "Polygon is being distributed subject to the following conditions: This distribution contains code from the GPC Library, and/or code resulting from the use of the GPC Library. This usage has been authorized by The University of Manchester, on the understanding that the GPC-related features are used only in the context of this distribution. It is not permitted to extract the GPC code from the distribution as the basis for commercial exploitation, unless a GPC Commercial Use Licence is obtained from The University of Manchester, contact: http://www.cs.man.ac.uk/~toby/gpc/".

What is installed

The VPython installer installs the vis, visual, and visual_common modules, the numpy, FontTools, Polygon, and ttfquery modules needed by VPython, and VIDLE, an improved version of the IDLE program editor, into C:\PythonXY\Lib\site-packages. A shortcut to VIDLE is placed on the desktop which references the VPython example programs.

Materials such as wood

Materials such as wood will work with graphics cards that support Pixel Shader 3.0 ("PS 3.0"). See
http://en.wikipedia.org/wiki/Pixel_shader#Hardware. Some materials may work with graphics cards that support PS 2.0, but other materials may need to be manually disabled: In the folder C:\PythonNN\Lib\site-packages\vis, edit the file site-settings.py to disable the use of shaders. If the graphics hardware does not support pixel shaders, the material property is ignored. If you think you should be able to use materials but have trouble with their display or performance, we highly recommend upgrading your video card drivers to the latest version.

Python 3

It is currently not feasible to run VPython 6 on Python 3, though it is hoped that this will be possible in the future. If you must use Python 3, you can use an older version 5.74 of VPython:

First, download and install the 32-bit Python-3.2.2 from python.org
Second, download and install VPython-Win-Py3.2-5.74

At http://www.lfd.uci.edu/~gohlke/pythonlibs/#vpython there is a 64-bit version prepared by Christoph Gohlke.

Older versions of Python are available