Home

Documentation

Download:
   Windows
   Macintosh
   Linux

What's new in Visual 5

Recent developments

VPython wiki

Mailing list

Contributed programs

For developers

Python web site

 

Download
for
Macintosh

hanoi

Update your graphics card driver

For proper performance, it is important to update the driver for your graphics card, especially if you have a Radeon card. For a desktop machine, go to the web site of the manufacturer of the graphics card. For a laptop, you should normally go to the web site of the laptop manufacturer, though for NVIDIA you may now find a newer driver available from NVIDIA. Some older graphics cards may not support all features: see this note on materials.

Mac downloads (Intel Macs, OSX 10.4 or later)

Several versions of Python are in common use. The versions of Python and VPython must match. If you are new to VPython, see How to run VPython.

Recent versions of OS X come with Python already installed, but it is not configured properly for use with VPython. It is advisable to install and use a Python installer listed below.

Python 2.7

First, download and install Python-2.7.1 (VPython does not work with Mac 64-bit Python, but this 32-bit version of Python works fine on 64-bit Macs)
Second, download and install VPython-Mac-Py2.7-5.72
This includes version 1.5.1 of numpy.

Python 3.1

First, download and install Python-3.1.3 (VPython does not work with Mac 64-bit Python, but this 32-bit version of Python works fine on 64-bit Macs)
Second, download and install VPython-Mac-Py3.1-5.72
The new Python 3 series is deliberately somewhat incompatible with the older Python 2 series. The main difference for the purposes of VPython programs is that instead of print "hello" you now say print("hello"). You can make programs work the same with Python 2.x or 3.x by using the new print format and placing the following statement at the start of your program (note the two underlines before future and the two underlines after future):

from __future__ import print_function, division

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

There is not yet a version of VPython for Python 3.2, because some of the modules on which VPython depends are not yet available for this very new version of Python.

Python 2.6

If you need to use Python 2.6 because some modules are not yet available for Python 2.7 or Python 3.1:
First, download and install Python-2.6.6 (VPython does not work with Mac 64-bit Python, but this 32-bit version of Python works fine on 64-bit Macs)
Second, download and install VPython-Mac-Py2.6-5.72
In order for this to work with scipy, it includes version 1.5.1 of numpy, which may not work with OSX 10.4.

Older versions of Visual

VPython for the older PowerPC Macs

Steve Spicklemire has built VPython 5.32 for PPC Macs.

What is installed

The VPython installer installs the vis and visual modules, the numpy, FontTools, Polygon, and ttfquery modules needed by VPython, and VIDLE, an improved version of the IDLE program editor, in /Library/Frameworks/Python.framework/Versions/X.Y/lib/pythonX.Y/site-packages.
Example programs, documentation, and a shortcut to VIDLE are placed in /Applications/VPython-PyX.Y.

VIDLE only

Here is a separate download of VIDLE, which is installed by the VPython installers available above.

How to run VPython

  • In /Applications, open the VPython-PyX.Y folder (where X.Y is 2.7 or 3.1 or 2.6).

  • Doubleclick VIDLE (an improved IDLE editor).

  • Open a program in /Applications/VPython-PyX.Y/examples--for example, bounce2.py.

  • Press F5 to run, or use the Run menu. (Depending on preferences, you may need to press fn-F5.)

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

  • Choose Visual on the Help menu for documentation.

Conditions of use

In support of the 3D text and extrusion objects, the Mac 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/".

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 Finder, click the icon for your hard drive and follow the path Library/Frameworks/Python.framework/Versions/N.N/lib/pythonN.N/vis. In that folder, edit the file site-settings.py to uncomment one or the other pair of Python statements. 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.

Other features new in Visual 5, such as transparency and local lights, work with all graphics cards.