More Linux installation details

The VPython installation procedure should work on most versions of Red Hat Linux, and it may work in other Linux environments as well. Here are tips on installing VPython on Debian and on Mandrake.


Installing VPython on Debian by Andy Dougherty, Dept. of Physics, Lafayette College

Other packages you may need are commonly, but not universally, installed on many Linux systems. I can tell you that on my Debian system, I also needed to add glib, gtk+, and some sort of OpenGL library. You may need to check that you have the development versions of the libraries. [1]

VPython includes gtkglarea, but if you can't use the supplied i386 rpm [2] you may also need to install gtkglarea from source. If so, I'd recommend using the slightly-newer gtkglarea-1.2.3 -- it worked marginally better for me.

Where you get OpenGL may depend, in part, on which X server you're using. I'm currently trying Mesa as an OpenGL replacement, but with mixed success. The Visual window only seems to be updated occasionally; with the same program under Windows, the updating is nearly continuous. Hope this helps,

[1] For some libraries, some Linux distributions sometimes ship both runtime and development versions. You need the development version if you want to compile.

[2] e.g. if you don't have an rpm command, or if if you're running on a different architecture, such as an Alpha or SPARC.


Installing VPython on Mandrake Linux by Francois Papa

1) I installed python 2.2, which is on the distribution CDs.

2) I installed the "Numeric" library (found on sourceforge, but also available on the CDs) and libpython2.2-devel (on the CD).

3) I installed libMesaGLU1, libMesaGLU1-devel, libMesaGL1, libMesaglut3 (Mesa already worked properly with Tuxracer). I also installed the official Nvidia drivers.

4) I had to modify several files in the RedHat Linux installer. The modifications were essentially related to the path of the python2.2 executables and headers. I made the following modifications.

    - install (main directory):
        PREFIX=/usr instead of /usr/local
        For Numeric, (PREFIX}/lib/${PYTHON) instead of (PREFIX}/bin/${PYTHON)

    - the Makefile in the cvisual directory:
        PYTHON_INCLUDES = -I/usr/include/python2.2/ instead of /usr/local/include/

    - the *.d files in the cvisual directory:
        /usr/include/python2.2 instead of /usr/local/include/python2.2

5) I modified two #include statements in xgl.h in the cvisual directory:
        gtk-1.2/gdk/gdk.h instead of gdk/gdk.h
        gtk-1.2/gtk/gtk.h instead of gtk/gtk.h

In addition, Andrew Morrison reported the following:

I have successfully installed on Mandrake 8.1. The notes by Francois Papa were helpful, but conditions were not exactly the same for my system. The difference between our systems was that somehow my installation of python2.2 uses /usr/local/ and his used /usr/. I did have to make the other changes he suggested. Martin Lutz told me, "When I tried to install the libMesaGLU1 and libMesaGLU1-devel rpms, I found I also needed libgcc3.0. Maybe installing that will allow your compile to work."

In a separate note Martin Lutz reported that on a modified Mandrake 8.2 he was able to compile Visual using gcc-2.96, but compilation failed using gcc-3.1. He offers the following details:

In configuration file /etc/colorgccrc you can "re-vive" the gcc-2.96 version by commenting out the lines with g++-3.1 and erasing the # at the beginning of the lines with g++-2.96:

# Define the paths to the actual location of the various compilers.
# (Currently, colorgcc only understands these: g++ gcc c++ cc)
#g++: /usr/bin/g++-3.1
#gcc: /usr/bin/gcc-3.1
#c++: /usr/bin/g++-3.1
#cc: /usr/bin/gcc-3.1

g++: /usr/bin/g++-2.96
gcc: /usr/bin/gcc-2.96
c++: /usr/bin/g++-2.96
cc: /usr/bin/gcc-2.96

Return to Linux download page