Installing VPython on a Mac
If you are running Leopard (OS X 10.5), and you don't intend to use the Fink package manager for anything other than installing VPython, you can use a quick and easy VPython installer:
VPython3.2.11_IntelOSX_5.pkg for an Intel Mac, prepared by John Armstrong.
VPython3.2.11_PowerPC_OSX_5.pkg.dmg for a PowerPC Mac, prepared by Bruce Sherwood.
The installer creates a folder /sw containing just those Fink packages, created by Martin Costabel, that are needed for VPython (Python 2.5, the Visual module, and the Numeric module, for a total download file of 23 MB).
Before running VPython programs, go to the X11 preferences, and in the Input section choose "Emulate three button mouse", in order to be able to rotate (Command-drag) and zoom (Option-drag).
The installer creates in the Applications folder a convenient VPython icon for starting up the IDLE program editor.
After starting up IDLE, the File open menu offers you many demo programs you can run.
If you already use the Fink package manager,
There is now an up-to-date Fink package for VPython installable on OSX 10.3 or later.
The following instructions usually work. More detailed instructions are provided by Danny Caballero.
1) Make sure you have installed X11 and the Xcode package:
On OSX 10.5, X11 is automatically installed.
Otherwise, scroll down on the installer DVD to "Optional Installs" and install X11.
Also, you need to install the XCode package from the installer DVD.
2) Use fink (a program used to install Unix-based OSX applications) to install VPython:
Download fink from http://fink.sourceforge.net for your version of OSX.
Despite what the Fink documenation says, Fink Commander is not included.
Get Fink Commander from http://finkcommander.sourceforge.net.
Run Fink Commander scroll to visual-py25 and select it.
Choose Binary > Install.
You will be asked for a password.
Select visual-py25 again, choose Binary > Install, and you will again be asked for a password.
Accept the default when asked.
Prior to OS X 10.5, you must enter the following into an X Terminal window, not the standard Terminal program.
This starts IDLE, and on the file menu you can choose an example program to run.
On the Run menu, choose Run Module or press fn-F5.
After starting IDLE, on the file menu you can choose an example program to run.
To zoom, hold down the Command key (Apple key) and the mouse button (emulating "right mouse button").
To rotate the camera angle, hold down the Option key and the mouse button (emulating "middle mouse button").
If there is no /sw/bin/vpython2.4, execute the following commands (or create a shell script containing these statements):
To customize IDLE:
You may find it useful to change the default behavior of IDLE. In
Configure IDLE, click General, and specify "Open Edit Window" and "No Prompt".
With "No Prompt", you will be prompted to save a new file the first time you run,
but your file will be automatically saved on all later runs.
Warning: this procedure takes a VERY long time; try this only if the binary install doesn't work.
If necessary, set Fink to use the "unstable" packages. There are two ways to do this:
Method 1. In Fink Commander, from the FinkCommander menu, choose Preferences.
Choose the Fink tab, and check the boxes for "Use unstable packages". Click "Apply". Wait for processing to finish (“barber pole” stops spinning).
Method 2. Edit the file /sw/etc/fink.conf. Add unstable/main to the "Trees:" line.
Note: unstable packages are newer versions that have not yet been moved into the "stable" releases. They may not really be any buggier than the "stable" packages. If you have a real reason to avoid updating all packages with new ("unstable") versions, then see:
for instructions on how to update only selected packages.
Quit Fink Commander. Run Terminal (in the Applications > Utilities folder) and type this:
This process takes a long time. The "-y" option makes default choices, which is fine and means you don't have to keep entering "y" during the lengthy process.
Next, in a Terminal window type this:
>> /sw/bin/fink install visual-py25
This process takes a very long time. It has to compile a large number of programs. If at some later time you want to install a newer version of visual-py25 it will not take long.
See above to run VPython.