Installation Instructions

This section will be an introduction how to install the program on different system. Please feel free to add informations here.

As the program is written in python it should be working under Linux, Windows and Mac OS-X. There can be some platfrom dependent differences which I will try to resolve. The stable versions will be tested on Linux and Windows, all others only unter Linux.

Colleagues using IFF computes, please move directly to this section!

Requirements

If you don't install the Windows binaries, some software requirements have to be fullfilled to use the Program, these are:

  • Gnuplot is used to create the plots
  • python (>=2.4) as the program is written in python
  • gtk2 with pygtk for the GUI functionality (recommanded, for OSX use WX-widgets which comes with Python)
  • numpy and scipy for some of the functionality as fitting
  • gfortran for the reflectometer fit program

In Linux it should be easy to install all these components via your repository system. Windows users will have to download and install all the Packages themselves, see the instructions below.

Installation under Linux

From Debian Repositroy

Since version 0.7 I have created a Debian repository for the program which can be used to install plot-script. Just add the line to your /etc/apt/sources.list or to a new .list file in the /etc/apt/sources.list.d directory:

deb http://plotpy.sourceforge.net/repository natty main

And add the repository key which can be found at http://iffwww.iff.kfa-juelich.de/~glavic/plotrepo/glavic_key.asc

To install use your package manager (e.g. apt-get, aptitude, kpackagekit) and install the plot-script package. Here is an example script:

echo "# Repository for the python program plot-script by Artur Glavic" > /tmp/plot.list
echo "deb http://plotpy.sourceforge.net/repository natty main" >> /tmp/plot.list
sudo cp /tmp/plot.list /etc/apt/sources.list.d
wget http://plotpy.sourceforge.net/repository/glavic_key.asc -O /tmp/glavic_key.asc
sudo apt-key add /tmp/glavic_key.asc
sudo apt-get update
sudo apt-get install plot-script

For distributions using python 2.6 as Ubuntu Maverick exchange “natty” with “maverick”.

From Debian package

The easiest way is to install from the .deb package. The main advantage of this method is, that this will check all dependencies of your system. This needs administrator privileges.

  • Download the latest .deb version from the Download Area
  • Install the package with your package manager
dpkg -i Plot-script-(Version).deb

If you got admin privileges I recommend this method as it adds menu entries for most program sessions for the latest versions and seems to be the most stable way.

On IFF computers

Users of iff internal computers normally don't have admin privileges, so to install the program on such terminals you need to do the following:

  • first try my installation script:
wget http://iffwww.iff.kfa-juelich.de/~glavic/install.sh -O - | sh

If this doesn't work:

  • Get the program source as described in the General section
  • In the extracted program folder type the following:
/usr/local/bin/python setup.py install --prefix ~/python --install-scripts ~/bin

From source

General

The installation procedure depends on your privileges, but the first steps are the same:

  • Download the latest version from the Download Area
  • Extract the .tar.gz file to a directory of your choice
tar -xvvzf Plot-script-(Version).tar.gz
  • Enter the directory
cd Plot-script-(Version)

Administrator privileges

  • Start the python installation script
python setup.py install

or

  • Start the installtion script
./install

Normal user

  • Find a directory in path, that you are allowed writing to
echo $PATH 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/your-user/bin
  • Start the python installtion script
python setup.py install --prefix /home/your-user --install-scripts /home/your-user/bin

or

  • Start the installation script (linking) to this directory
./install /home/your-user/bin

Adding Commandline Completion

You can add commandline completion for the Linux console by adding the following lines to your ~/.bashrc:

_plot_complete() { 
  local curw
  COMPREPLY=()
  curw="${COMP_WORDS[COMP_CWORD]}"
  if [ $COMP_CWORD == 1 ]
    then COMPREPLY=($(compgen -W "squid 4circle dns treff refl in12 kws2 gisas" -- $curw))
    else case "${COMP_WORDS[1]}" in
      "dns") COMPREPLY=($(compgen -G "$curw*.d_dat" -- $curw) $(compgen -G "$curw*.d_dat.gz" -- $curw));;
      "4circle") COMPREPLY=($(compgen -G "$curw*.spec" -- $curw) $(compgen -G "$curw*.spec.gz" -- $curw) $(compgen -G "$curw*.fio" -- $curw) $(compgen -G "$curw*.fio.gz" -- $curw));;
      "squid") COMPREPLY=($(compgen -G "$curw*.dat" -- $curw) $(compgen -G "$curw*.dat.gz" -- $curw));;
      "kws2") COMPREPLY=($(compgen -G "$curw*.DAT" -- $curw) $(compgen -G "$curw*.gz" -- $curw));;
      "gisas") COMPREPLY=($(compgen -G "$curw*.edf" -- $curw) $(compgen -G "$curw*.cmb" -- $curw) $(compgen -G "$curw*.gz" -- $curw));;
      "in12") COMPREPLY=($(compgen -o default -- $curw));;
      "treff") COMPREPLY=($(compgen -o default -- $curw));;
      "refl") COMPREPLY=($(compgen -G "$curw*.UXD" -- $curw) $(compgen -G "$curw*.gz" -- $curw));;
    esac
  fi
  return 0
  }
 
complete -F _plot_complete -o dirnames plot.py

Installation under Windows

Complete package installer (recommended)

Download the complete package installer (plot-script-{Versoin}_setup.exe). This can take a while as it is about 30MB in size.

Run the installer after download, this should install the complete program. After installation you can run the program from the Start menu or a .bat files in the examples directory. Take a look into the .bat files with a text editor to see how the program is used from the console.

This is the easiest installation if you don't use python. I test it on a WinXP virtual machine quite often but can't guarantee that it's working. I recommend all windows users to use this method.

Other methods are not tested any more so I won't update this section anymore. If installing with the setup doesn't work you can still try it and should use the source distribution.

Install from Source (advanced)

Download additional software packages

Before you can start the installation of the program in Windows you will have to install some additional software mentioned above. If you use the versions listed below you can try my {file name=“install.bat” desc=“installation batch file”}.

Python

(v 2.6.1 for batch)

Gnuplot

(v 4.2.5 for batch)

GTK2 and pygtk

(gtk v 2.12.9; pygtk v 2.12.1-3; pygobject v 2.14.2-2; pycairo v 1.4.12-2 for batch)

Numpy and Scipy

(numpy v 1.3.0; scipy v 0.7.1rc3 for batch)

Installing the script

* Download the latest version from the Download Area * Put all installation files in one directory together with the batch file * Run the batch file and follow the instructions

Installation under OSX

Until I manage to get Py2App working with the software (this creates a stand alone application as for windows) you will have to install all dependencies and use the instructions for Source installation in the Linux section.

installation_instructions.txt · Last modified: 2012/07/27 15:27 by plot_admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki