25
Space Time Analysis of Regional System Install Guide Version 0.7.2 2004 July 4 Young-sik Kim Mark V. Janikas

Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

SpaceTimeAnalysis ofRegionalSystem

Install GuideVersion 0.7.22004 July 4

Young-sik Kim

Mark V. Janikas

Page 2: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

Copyright c© 2003 Sergio J. Rey.Printing history:

July 2004: First edition.

Department of GeographySan Diego State UniversitySan Diego, CA 92182

Permission is granted to copy, distribute, and/or modify this document un-der the terms of the GNU Free Documentation License, Version 1.1 or any laterversion published by the Free Software Foundation; with the Invariant Sectionsbeing “Foreword,” “Preface,” and “Contributor List,” with no Front-Cover Texts,and with no Back-Cover Texts. A copy of the license is included in the appendixentitled “GNU Free Documentation License.”

The GNU Free Documentation License is available from www.gnu.org or bywriting to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,MA 02111-1307, USA.

The original form of this book is LATEX source code. Compiling this LATEXsource has the effect of generating a device-independent representation of a text-book, which can be converted to other formats and printed.

The LATEX source for this book is available from the author at [email protected]

Rey, Sergio J,STARS: Space-Time Analysis of Regional Systems

1st ed.p. cm.ISBNLCCN

1. Dynamic Geographic Data Analysis 2. Visualization 3. Open Source I. Rey,

Page 3: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

Contents

1 How to Install STARS in a Windows system 11.1 Installing when you don’t have Python . . . . . . . . . . . . 1

1.1.1 Downloading and installing a STARS setup file . . . . 11.1.2 Creating a new environment variable for STARS . . . 3

System that has Windows XP, NT, or 2000 . . . . . . 3System that has Windows 98 or Me . . . . . . . . . . 5

1.2 Installing source files when you have Python installed . . . 71.2.1 Installing STARS source files . . . . . . . . . . . . . . 71.2.2 Creating an environment variable . . . . . . . . . . . . 8

2 How to Install STARS on a Unix/Linux/Mac OS X 172.1 Python and Numeric . . . . . . . . . . . . . . . . . . . . . . 17

2.1.1 Debian Specific . . . . . . . . . . . . . . . . . . . . . . 172.1.2 Important Note For Red Hat 9.0 . . . . . . . . . . . . 18

2.2 Installation of STARS Source Distribution . . . . . . . . . . 182.2.1 OS X Notes . . . . . . . . . . . . . . . . . . . . . . . . 19

Page 4: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

iv Contents

Page 5: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

List of Figures

1.1 Downloading STARS installer(setup file) . . . . . . . . . . . . 21.2 Starting STARS installer . . . . . . . . . . . . . . . . . . . . . 21.3 License agreement . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Selecting STARS directory . . . . . . . . . . . . . . . . . . . . 41.5 Selecting STARS start menu folder . . . . . . . . . . . . . . . 51.6 Creating STARS icons . . . . . . . . . . . . . . . . . . . . . . 61.7 Installing STARS as selected . . . . . . . . . . . . . . . . . . 71.8 A brief information on STARS . . . . . . . . . . . . . . . . . 81.9 Finishing STARS installation . . . . . . . . . . . . . . . . . . 91.10 Opening Control Panel . . . . . . . . . . . . . . . . . . . . . . 91.11 Opening System menu . . . . . . . . . . . . . . . . . . . . . . 101.12 Selecting Advanced options . . . . . . . . . . . . . . . . . . . 101.13 Selecting Environment Variable options . . . . . . . . . . . . 111.14 Environment Variable dialog box . . . . . . . . . . . . . . . . 111.15 Entering STARSHOME variable and its value . . . . . . . . . 121.16 Created STARSHOME variable . . . . . . . . . . . . . . . . . 121.17 Running STARS . . . . . . . . . . . . . . . . . . . . . . . . . 131.18 Editing autoexe.bat in Notepad . . . . . . . . . . . . . . . . . 131.19 Finding autoexe.bat file . . . . . . . . . . . . . . . . . . . . . 141.20 Running STARS . . . . . . . . . . . . . . . . . . . . . . . . . 141.21 Downloaded zip file of STARS . . . . . . . . . . . . . . . . . . 151.22 Extracting STARS source files . . . . . . . . . . . . . . . . . . 15

Page 6: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows
Page 7: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

Chapter 1

How to Install STARS in aWindows system

STARS is a software package written in the Python, which is an open sourceinterpreter-type language being broadly used. In this section, you will learnhow to install STARS onto your computer when you are using MS Win-dows as your main operation system. Installation of STARS in Windowsenvironment can be done in two different ways.

• Downloading and installing a binary installer when you don’t havePython in your system.

• Downloading and extracting a zipped source file when you have Pythoninstalled in your system.

In the following, you will see step-by-step instruction on the installationfor each case.

1.1 Installing when you don’t have Python1.1.1 Downloading and installing a STARS setup file

In order to run STARS in your computer, you first need the Python inter-preter, which is available from the official Python website (www.python.org).However, even if you don’t have python installed in your system, you canenjoy STARS by installing a binary STARS installer. You can download thisbinary setup file (stars windows versionNumber.exe) from the following link:http://stars-py.sourceforge.net/download You may download the installer inany directory you want.

Page 8: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

2 How to Install STARS in a Windows system

Once you finish downloading the installer like Figure 1.1, then you canstart installation by double-clicking it.

Figure 1.1: Downloading STARS installer(setup file)

And you will see the welcome screen of STARS installer (Figure

1.2). If you click Next here, you will see the license agreement of STARSuse and redistribution. STARS is an open-source software and is under theterms of GNU General Public License, which means you can freely use. Youhave to accept the agreement to continue installing STARS (Figure 1.3).

Figure 1.2: Starting STARS installer

The next step is to select a directory where you want to install STARS.Default setting is C:\STARS (Figure 1.4), but you can change the name ofdirectory as far as it has no white space (i.e. Naming a STARS directory as

Page 9: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.1 Installing when you don’t have Python 3

Figure 1.3: License agreement

C:\STARS 0.7 would cause an error).

Then you will be asked about STARS start menu folder. You can selecta default name or type in a new folder name as you want. If you don’t wantto have start menu folder of STARS, you can simply checkout the option indialog box (Figure 1.5).

After selecting menu folder, you will be asked whether or not to create adesktop icon and a quick launch icon. It is advised that you have at least adesktop icon created for easy use of STARS in Windows environment. Youcan create these icons after installation too (Figure 1.6).

Now you are ready to install STARS. STARS installation will be startedwhen you click Next (Figure 1.7). Once the files have been installed youwill briefly see some information in a dialog box (Figure 1.8). Then you canfinish the installation by clicking Finish (Figure 1.9).

Now you have STARS installed in your system. However, you need tohave a new environment variable for STARS to run properly (STARS won’tbe running otherwise). In the next section, we will learn how to create thisenvironment variable (it is much easier than it sounds).

1.1.2 Creating a new environment variable for STARS

System that has Windows XP, NT, or 2000

Once you finish installation, you have to create an environment variablecalled “STARSHOME” in your system. This task is slightly different frommachine to machine depending on which Windows version you are using.

Page 10: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

4 How to Install STARS in a Windows system

Figure 1.4: Selecting STARS directory

If you use the Windows XP, NT, or 2000, you can create this variable byfollowing the steps below:

First, go to START and choose Control Panel (Windows XP system).If you are using Windows 2000 or NT, you will have to select Settings atSTART before you find Control Panel menu (Figure 1.10). Then click Sys-

tem among many other control panel selections (Figure 1.11).When dialog box of System menu appears, click Advanced tab (Figure

1.12). Then you will see an option for Environment Variable (Figure 1.13).By clicking this, you will get to the environment variable dialog box (Figure1.14).

The next procedure is to specify a variable name and value. Select New

and type in STARSHOME for a variable name, and put a directory whereyou installed STARS in as a variable value. (for example, if you installedSTARS into ‘C:\STARS\ directory (default setting from the installer), youshould type in C:\STARS\ in a variable value section. See figure 1.15

NOTE: Make sure that you typed in \ at the end of line for variablevalue. (e.g. If you typed in C:\STARS, STARS won’t be run. In this case,C:\STARS\ is correct.)

If you click OK, you will see that STARSHOME variable has been created(Figure 1.16). Now all steps of STARS installation are finished. You canrun STARS by double-clicking STARS icon on the desktop (Figure 1.17).

A summary of the above-explained procedures is as follows:

1. Go to START → Settings (In case of Windows NT/2000 system) →

Page 11: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.1 Installing when you don’t have Python 5

Figure 1.5: Selecting STARS start menu folder

Control Panel, then open System.

2. Click Advanced tab. Then you will see “Environment Variables” op-tion.

3. Click Environment Variables tab.

4. Click New to create a new variable called “STARSHOME”. Once yousee the dialog box, put “STARSHOME” in a variable name, and puta directory where you installed STARS into in a variable value. (forexample, if you installed STARS into ‘C:\STARS\’ directory, you cantype in C:\STARS\ in a variable value section. See figure 1.15)

5. Then click OK. Depending on system, sometimes it needs rebootingbefore running STARS, but in most cases it won’t necessary.

6. Once you finish creating STARSHOME variable, you are ready to useSTARS. You can simply start STARS by clicking STARS icon on yourdesktop.

System that has Windows 98 or Me

If your operating system is either windows 98 or windows Me, then you willhave to create STARSHOME variable in your autoexec.bat file.

First, open Notepad or any other text editor. then open autoexec.bat file,which is usually located under C:\ or C:\Windows directory (Figure 1.18).

Page 12: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

6 How to Install STARS in a Windows system

Figure 1.6: Creating STARS icons

NOTE: autoexec.bat is a Windows system file so often it is marked as‘hidden file’, which makes you unable to find it from Notepad. In orderto edit this file, you should find the file from Windows explorer with View

hidden files option selected, then use right-click and select Edit (Figure1.19).

Then you can add a new variable STARSHOME by typing in a line:

SET STARSHOME = STARS directory (i.e. STARS directory = C:\STARS\

See Figure 1.20 for an example. Whatever STARSHOME directory is,you must have a backslash (\) at the end of line !)

You may need to reboot to enable this setting. After rebooting, you willbe able to run STARS by clicking STARS icon.

A summary of these steps are as follows:

1. Open Notepad or any other text editor.

2. Open a file called “autoexec.bat”. It usually lives in under root direc-tory C:\.

3. Once you open this file, type in SET STARSHOME = STARS direc-tory. You should use the directory you installed STARS as a variablevalue(e.g. C:\STARS\). (Do not forget to a backslash (\) at the endof line!) See figure 1.20.

Page 13: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.2 Installing source files when you have Python installed 7

Figure 1.7: Installing STARS as selected

4. Reboot the system to activate this change. After rebooting, runSTARS by double-clicking STARS icon.

1.2 Installing source files when you have Pythoninstalled

If you already have Python installed in your system, you can simply down-load the zipped source files and extract them to a directory. But beforeyou download the STARS source codes, you should check if you have the allrequirements:

• Python version 2.3 or above

• Numerical Python (Numpy) version 23.0 or above

1.2.1 Installing STARS source files

To get the required version of Python distribution for your system, visitthe Download Python Software page at www.python.org/download.the offi-cial NumPy website provides us introductions on NumPy and related links(www.numpy.org). The NumPy source codes are being distributed in theNumPy project page, located in sourceforge site (www.sourceforge.net). Thelatest release of NumPy is version 23.0.

Page 14: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

8 How to Install STARS in a Windows system

Figure 1.8: A brief information on STARS

Once you have all these requirements, you can simply download a zippedSTARS source codes from http://stars-py.sourceforge.net/download. Figure1.21 is an example of zipped STARS source files.

If you open the file after downloading, it will automatically create theSTARS directory on the destination you specified and extract all files andsubdirectories in the directory (Figure 1.22).

Once you find all files extracted, you can execute STARS by double-clicking ’starsgui.py’ in the src subdirectory. Then you will be able to see aSTARS session starting (Figure 1.17).

1.2.2 Creating an environment variableThe way of creating STARSHOME variable is the same as when installingbinary installer. This depends on windows version you use. For details, see1.1.2.

Once you finish create a STARSHOME variable, you may need to rebootto enable this setting. After rebooting, you will be able to run STARS bydouble-clicking starsgui.py file or typing in python starsgui.py at commandprompt.

Page 15: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.2 Installing source files when you have Python installed 9

Figure 1.9: Finishing STARS installation

Figure 1.10: Opening Control Panel

Page 16: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

10 How to Install STARS in a Windows system

Figure 1.11: Opening System menu

Figure 1.12: Selecting Advanced options

Page 17: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.2 Installing source files when you have Python installed 11

Figure 1.13: Selecting Environment Variable options

Figure 1.14: Environment Variable dialog box

Page 18: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

12 How to Install STARS in a Windows system

Figure 1.15: Entering STARSHOME variable and its value

Figure 1.16: Created STARSHOME variable

Page 19: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.2 Installing source files when you have Python installed 13

Figure 1.17: Running STARS

Figure 1.18: Editing autoexe.bat in Notepad

Page 20: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

14 How to Install STARS in a Windows system

Figure 1.19: Finding autoexe.bat file

Figure 1.20: Running STARS

Page 21: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

1.2 Installing source files when you have Python installed 15

Figure 1.21: Downloaded zip file of STARS

Figure 1.22: Extracting STARS source files

Page 22: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

16 How to Install STARS in a Windows system

Page 23: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

Chapter 2

How to Install STARS on aUnix/Linux/Mac OS X

2.1 Python and Numeric

STARS depends on the Python and Numeric software packages. Pleasecheck to see whether your system meets these requirements:

• Python 2.3 or greater (with Tkinter)

http://www.python.org

• Numeric (a.k.a. Numpy) 23.1 or greater

http://sourceforge.net/projects/numpy

2.1.1 Debian Specific

Debian users can also choose to use the apt-get package to install Pythonand Numeric. Here is a list of the Debian Packages needed:

python2.3

python2.3-dev

python2.3-htmlgen

python2.3-numeric

python2.3-numeric-ext

python2.3-tk

Page 24: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

18 How to Install STARS on a Unix/Linux/Mac OS X

2.1.2 Important Note For Red Hat 9.0

If you’re compiling from source on Red Hat 9, RH9 compiles Tcl/Tk asUCS-4, but Python still defaults to UCS-2. You can either use:

./configure --enable-unicode=ucs4

See website:

http://www.python.org/download/download_linux.html

for more details.

2.2 Installation of STARS Source Distribution1. Download the STARS tarball at the project website:

https://sourceforge.net/projects/stars-py/

2. Unpack the archive into a working directory. Currently all code is tobe run from this directory. Future releases will be set up as modulesto add to the site-packages directory of a Python installation.

Assuming you unpacked to:

/home/user/stars

3. Set the environment variable STARSHOME. (following the above ex-ample on a bash shell:

export STARSHOME="/home/user/stars/"

4. Create an alias:

alias stars="python /home/user/stars/starsgui.py"

5. At a shell prompt:

stars

6. If all works you should put steps 3 and 4 in your .bashrc file.

Page 25: Space Time nalysis of Regional ystem - SourceForgestars-py.sourceforge.net/install_guide.pdf · First, go to START and choose Control Panel (Windows XP system). If you are using Windows

2.2 Installation of STARS Source Distribution 19

2.2.1 OS X Notes

STARS can run under X11 with Fink python, as well as Aqua. For thelatter you need to have MacPython

http://homepages.cwi.nl/~jack/macpython/

setup with Aqua-Tk. You can add a second alias from step 3 above as:

alias starsw="pythonw /home/user/stars/starsgui.py"

If you want to run STARS under X11 and Fink python, make sure thatyour alias in step 4 points to Fink python and not the default Apple python.The latter does not come with Tk enabled.