Installing VPython on Linux/Unix:
The following instructions apply if you are installing the older stable version
Before following the instructions below, first check to see whether your Linux distribution already has an easy-to-install package for Visual (the 3D module for Python).
Ubuntu 7.10: On the latest version of Ubuntu (7.10), there is a package "python-visual" which works but is rather old (Visual 3.1.1). After installing python-visual, an attempt to build the most recent production version of Visual (3.2.9) from the source offered below gave a configuration error with pkg-config for gtk+, with error message "sh: gtk-config: not found", which is not yet understood. After using the package manager to install libboost-python and libboost-thread devlibraries, it was possible to install the beta version of Visual from the package available at sourceforge. However, the package gtkglextmm is missing from Ubuntu 7.10 and can be difficult to build from source, so binaries are provided here.
Here are Fedora Core 7 and 9 packages, both stable and beta versions.
1) Install Python 2.3 or 2.4 or 2.5 if necessary:
Start a "terminal emulator" or "typescript", then type this command:
python (you should see"Python 2.3" or "Python 2.4" or "Python 2.5" ); type 4+2, press Enter, and you should see 6)
Ctrl-D to exit from Python.
If Python has been successfully installed, skip to Step 2).
If possible, obtain Python by rpm or similar package mechanism.
If not available, download the file Python-2.5.tar.bz2
Download the file visual-3.2.9.tar.bz2
tar -jxf visual-3.2.9.tar.bz2 (uncompress and extract files; produces visual-x.x.x directory)
In the visual directory, read INSTALL.txt for instructions on what packages you need.
In addition to other packages, you may need to install gtkgl-dev.
Because there is now little support for gtkglarea, you may need this: gtkglarea-1.2.3.tar.gz
Important: Special procedures are needed on SuSE Linux
If you did not obtain Numeric for Python (Numpy) by rpm or similar package mechanism:
Go to the Numerical Python Project Page.
Click numpy download and download the platform-independent version Numeric-24.2.tar.gz.
tar -zxf Numeric-24.2.tar.gz (uncompress and extract files; produces Numeric directory)
After unpacking, cd into the Numeric-24.2 folder and execute python setup.py install.
Notes for SuSE 9.0:
Go to the YaST Control Center, enter root password. Click Install and Remove Software.
Set Filter to Package Groups, Development, Languages. Check gcc, gcc-c++, tcl-devel, and tk-devel.
In Development, Libraries, check glib-devel, gtk-devel, XFree86-devel, and XFree86-Mesa-devel.
Set Filter to Search and search for gtkglarea and check this package.
Also search for pkgconfig and check this package.
Click Accept to install all these packages.
Important: Special procedures are needed to install the Boost libraries on SuSE Linux
which python (find out where Python is located)
Make a note of the prefix preceding /bin/python, such as /usr or /usr/local.
For SuSE 9.0: Because gtkglarea.h is in a nonstandard location on SuSE (/opt/gnome/include/gtkgl),
before running ./configure execute this: CPPFLAGS=-I/opt/gnome/include (note the "-" before the I).
And you need to use CXX=g++-3.3.3 (see Special procedures).
(a) If prefix is /usr/local, execute
(b) If prefix is something else, and Visual can go into prefix/lib/python/site-packages, execute
(c) If you want to use a different version of Python than the one found with "which python",
or (b) is not appropriate, specify both the particular Python and where to install Visual:
PYTHON=/somewhere1/bin/python ../visual-x.x.x/configure --prefix=/somewhere2
If "somewhere1" and "somewhere2" are different, you must also add the "somewhere2"
directory to Python's module search path. For details, at www.python.org read section 4.1
(Modifying Python's Search Path) in the section Installing Python Modules of the Python 2.3
make (compiles the Visual module)
This will take many minutes and generate lots of output on the screen.
You may see some warning messages, which normally you can ignore.
sudo make install (installs all components)
You may wish to create a vpython convenience shell script containing these statements, suitably modified for version and location:
[VPython home page] [other platforms]