Instructions for installing SVS.
introduction
overview of installation process
general requirements
software and external libraries required for running SVS on all platforms
OS X requirements
additional software and external libraries required for running SVS on OS X systems
installation
installing SVS
introduction
This page provides information on installing SVS. Installation has been tested on GNU/Linux (running Ubuntu Debian) and OS X (running OS 10.3, Panther). The main installation of SVS on both systems is similar but OS X requires some additional software and libraries. We have not yet been able to test installation on Windows systems.
The general requirements section provides a listing of software and external libraries that are required for all platforms running SVS. Each entry is provided with a short description, a simple test to check if you have it installed already, and a link to download it. In most cases the installation of these is straightforward and instructions for each are normally distributed with the installation files. Where needed more information is normally available from the download site or from additional sites listed with each entry.
Before installing SVS itself, you should make sure that you have installed all the necessary requirements, then follow the installation instructions for your platform.
Thanks to Calum Selkirk for troubleshooting the OS X installation process.
general requirements
Software and external libraries required for all platforms.
software
Python
http://www.python.org
SVS is written in, and runs with, the Python programming language. A Python runtime engine
is required to run SVS. This version of SVS was developed primarily with Python version 2.3. It should be upwards compatible with later versions of Python, but is not guaranteed to be backwards compatible with earlier versions.
A current install of Python is available from: http://www.python.org. If you are new to Python tutorials can also be found at this site. You will need some basic familiarity with Python in order to make proper use of SVS and the demo applications.
Test:
Python is normally run from the command line by simply typing:
python
If Python is not installed you will get an error message such as command not found. If Python is installed then the Python interactive shell will start up and a message will be printed in the terminal. The first line of this message will tell which version of Python is running:
Python 2.3.4 (#2, Aug 17 2004, 19:31:38)
[GCC 3.3.4 (Debian 1:3.3.4-5ubuntu1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
You can also check the current version of Python from the command line by entering:
python -V
You may have multiple versions of Python installed on your system. If this is the case and your default version is not compatible with SVS, then you can start a specific version of Python but entering something such as:
python2.3
external libraries
Various external libraries are required to run SVS, providing graphical interface components and networking capabilities for example. Some of the libraries are standard with certain distributions of Python, but others are not. Instructions for testing if you have a given library are given along with a listing of where it is available from. All the tests can be run in a standard Unix-style terminal. Some run straight from the terminal commandline, others from inside the Python interactive shell.Note that the required external libraries may change with future versions of SVS. If upgrading to a future version, you should also check if any further libraries are required.
Installing SVS on Apple OS X requires some additional libraries specific to that platform. See the OS X installation instructions for more information.
svs_core external libraries are required for all packages: svs_simulation additional required libraries: svs_soya additional required libraries: svs_analysis required libraries: Experienced Python users can check for these through the modules listing of the help tool in the Python interactive shell. More detailed information for checking and obtaining each library is given below.
wish
If Tcl/Tk is installed, this will launch a small empty window on your desktop. Just close the window to quit.
Tcl/Tk is available from: http://www.tcl.tk, and http://tcl.sourceforge.net.
To test if you have Tkinter installed, launch the Python interactive shell and then enter:
import Tkinter
If Tkinter is not installed you will get an error message such as:
Traceback (most recent call last):
File "
ImportError: No module named Tkinter
If it is installed you will just get a fresh prompt appearing. If you wish to check that it is fully working then enter:
Tkinter.Tk()
This will open a small empty window on your desktop. Close the window to finish.
There are additional issues involved in using Tcl/Tk and Tkinter on OS X systems, see the OS X requirements for information.
wxPython
http://www.wxpython.org
wxPython provides Python bindings to the wxWidgets graphical user interface toolkit. This can be used as an alternative to Tkinter for creating the graphical user interfaces in SVS clients. Some of the example applications, such as 'devtools', use it, but it is only an optional requirement for working with the core SVS framework. wxPython is not part of the standard Python distribution so may need to be installed, along with the wxWidgets toolkit.
To test if you have wxPython installed, enter this command in your Python shell:
import wx
wxPython is available from: http://www.wxpython.org.
wxWidgets is available from: http://www.wxwidgets.org.
Twisted
http://twistedmatrix.com
Twisted is a networking framework for Python. It provides the basis for all the networking capabilities in SVS.
To test if you have Twisted installed, run the following command in the Python interactive shell:
import twisted
If twisted is present, you should also check that you have an up-to-date version of Twisted (SVS was developed with Twisted version 2.0.0). To check your installed version, after entering the import twisted command enter:
twisted.__version__
A number, such as 2.0.0 should be displayed in the Python shell.
Twisted is available from: http://twistedmatrix.com. Follow the installation instructions at the site.
Twisted 2.0.0 also requires the Zope Interface package (version 3.0.1 or above). To test if this is already installed, enter the following in the Python interactive shell:
import zope.interface
Zope Interface is available separately from: http://zope.org/Products/ZopeInterface.
PyXML
http://pyxml.sourceforge.net
PyXML is used for parsing the XML documents that the gameworld files from the example applications are written in. It is not essential for the main SVS libraries themselves, but is recommended. PyXML is often bundled with Python distibutions as standard.
To test if it is already installed, enter the following in the Python interactive shell:
import xml
PyXML is available from: http://pyxml.sourceforge.net
PyGraphLib
http://pygraphlib.sourceforge.net
PyGraphLib is used for modelling and manipulating graph-type data structures. This is not part of a standard Python distribution so will probably need to be installed.
To test if it is installed, enter the following in the Python interactive shell:
import pygraphlib
PyGraphLib is available from: http://pygraphlib.sourceforge.net.
Python CVS Library
http://software.cnx.rice.edu/downloads/python/pycvs
The Python CVS Library provides access to and interaction with a CVS repository. Basically, it is a set of Python wrappers around the standard CVS client. It is only used by the svs_tracking package within SVS, and is currently not required for running the examples, however, it is likely to become integral to later versions of SVS.
To test if it is installed, enter the following in the Python interactive shell:
import cvs
Python CVS Library is available from: http://software.cnx.rice.edu/downloads/python/pycvs. Note that this should not be confused with the PyCVS project, which is a different, approach to providing Python access to CVS.
Numeric Kinds
http://cvs.sourceforge.net/viewcvs.py/numpy/kinds/
Kinds is a module from the Numeric library. It provides support for identifying system-specific numeric constants and values, such as the maximum interger available. It is used in the svs_simulation package.
To test if it is already installed, enter the following in the Python interactive shell:
import kinds
Kinds is not part of the standard Numeric library and must be downloaded from the Numeric CVS: http://cvs.sourceforge.net/viewcvs.py/numpy/kinds/
Tarball: kinds-1.2.tar.gz
The main Numeric library is available at: http://numeric.scipy.org/
Polygon
http://www.dezentral.de/soft/Polygon/
Polygon provides speicalised handling of polygonal shapes. It is used by the svs_simulation package.
To test if it is already installed, enter the following in the Python interactive shell:
import Polygon
Polygon is available from: http://www.dezentral.de/soft/Polygon/
Soya 3D
http://home.gna.org/oomadness/en/soya/index.html
Soya 3D is a 3D graphics library for games. It is used by the svs_soymulation package.
To test if it is already installed, enter the following in the Python interactive shell:
import soya
Soya 3D is available from: http://home.gna.org/oomadness/en/soya/index.html. There are several additional librraies required to run Soya 3D, these are listed on the Soya website.
The Soya-based client also requires wxPython. To test if it is already installed, enter the following in the Python interactive shell:
import wxPython
wxPython is available from: http://www.wxpython.org/
OS X requirements
This section describes additional software and libraries that are required for running SVS on OS X systems. OS X users should check they have the requirements described here and then follow those for the general requirements.
software
Developer Tools
It is advisable to install the Apple Developer Tools and Xcode. These come with the OS X installation discs and are also available to download for free from: http://developer.apple.com/tools/xcode/index.html.
Make sure that you include the X11 utility and X11 SDK. These enable Unix-based graphical systems (such as Tcl/Tk) to integrate with the OS X Aqua graphics system. The X11 utility is found in the Utilities subdirectory of the main Applications directory on the OS X hard drive. The X11 installer can be downloaded from: http://www.apple.com/support/downloads/x11formacosx.html. More information on using X11 with OS X is available from: http://developer.apple.com/darwin/runningX11.html.
MacPython
OS X comes ready-installed with Python (version 2.3 on OS X 10.3, Panther), however it is advisable to install the MacPython tools and extensions. These provide additional functionality to the basic Python system on OS X as well as utilities such as a Package Manager for adding external Python libraries.
MacPython is available from: http://homepages.cwi.nl/~jack/macpython/.
Tcl/Tk
The Tcl/Tk libraries need to be installed on OS X (see Tkinter section above).
Tcl/Tk for OS X is available from: http://tcltkaqua.sourceforge.net/.
After installing Tcl/Tk, you will need the _tkinter (with an underscore at the start of the name) package for Python. This is an additional package that provides underlying support for the standard Tkinter libraries that come with Python and is required for using Tkinter on OS X.
It is best to install _tkinter using the MacPython Package Manager. Launch the Package Manager. This will load a repository of Python packages which should include _tkinter. If this is not available, go to the File menu and select Open URL, and enter: http://www.python.org/packman/version-0.3/darwin-7.0.0-Power_Macintosh.plist, and install _tkinter from there.
For additional information about installing Tcl/Tk with Python on OS X see:http://tony.lownds.com/macosx/tkinter.html, and http://www.visionegg.org/install-macosx-details.html (you only need to follow as far as the _tkinter instructions on this page).
running Tcl/Tk interfaces on OS X
Whilst Python applications using the Tcl/Tk (Tkinter) graphics library can be run from the standard OS X terminal, there are some problems with the current version of Tcl/Tk running under Aqua. It is recommended, therefore, to launch the graphical SVS applications (such as the player clients in the examples), by first launching X11 and then running the scripts from the X11 terminal.
fig. 1.) interfaces running on Aqua, left, and X11, right (click to enlarge).
external libraries
With the exception of the _tkinter package required for Tcl/Tk support, OS X users should install the same external libraries as listed in the general requirements.
installation
Check that you have the necessary dependencies installed, these are listed general requirements above. If any are missing, you can download and install them from the URLs provided. OS X users should first check and install the necessary requirements listed in OS X requirements.
To install SVS, download the files to your local directory, then perform the following steps in a terminal:
Step 1
Unpack svs-x.x.tar.gz:tar -zxvf svs-x.x.tar.gz
This will create a directory, called 'svs-0.2' or such, within this directory are the following:
| README | installation instructions |
| LICENSE | distribution license (GPL) |
| setup.py | installer |
| svs_core | source package directory |
| svs_demogame | source package directory |
| svs_simulation | source package directory |
| svs_analysis | source package directory |
Step 2
Enter the svs-x.x directory:cd svs-x.x
Step 3
To install run:python setup.py install --prefix=/usr/local
As this is an early development version of SVS, it is recommended that you install it in your /usr/local directory rather than the main system directories for Python packages.
You should run the install script as 'root' or using sudo:
sudo python setup.py install --prefix=/usr/local
Step 4
The code for the example applications and tutorials is contained in their own archive, 'svs_examples-0.3.tar.gz', which must be downloaded separately. This archive should be unpacked to your home directory or wherever you wish to keep them. There is no installer for the example files. After installing the main SVS packages, the examples can be run from anywhere on your system. Copy the archive to where you wish to run the examples, and then unpack the archive using:tar -zxvpf svs_examples-x.x.tar.gz