1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Windows

Try the fable_python_exe version which also includes fabian at http://downloads.sourceforge.net/fable/fable_python_exe.zip
Otherwise install all of the packages mentioned below along with a python interpreter.
Note that if you get pyopengl 3.x for python2.5 you need to "borrow" the opengl.tk directory from a python2.4 / pyopengl 2.x.

Unix ish platforms

Try this:
Download and install python from www.python.org - or find it on your computer already
Download and install numpy from numpy.scipy.org
Download and install the matplotlib plotting package from matplotlib.sourceforge.net
Download and install Togl for tcl/tk from togl.sourceforge.net
Download and install the opengl extensions pyopengl.sourceforge.net
Those were the dependencies, now you're ready, assuming they all installed and worked:
Download and install the ImageD11 from sourceforge.net/project/showfiles.php?group_id=82044

  python setup.py build install

or if you are not root:

  python setup.py build install --home=/users/wright

unix users then need (bash syntax):

  export PYTHONPATH=/users/wright/lib/python/:/users/wright/lib/python2.4/
  export MATPLOTLIBDATA=/users/wright/share/matplotlib/

At ESRF the programs are installed in /sware/exp/fable/standalone/bin on the nice cluster.
Windows users can get the excellent mingw compiler suite from www.mingw.org eventually giving them the gcc comiler for use under windows to build binary extensions.

  python setup.py build --compiler=mingw32

Followed by:

  python setup.py install

After it is installed, you should find a script ImageD11_gui.py, somewhere like ~/bin/ or c:/python24/scripts

Problems?

Whatever you are trying to do, you will (almost) always get an informative error message when something goes wrong. To see the error message (particularly under windows) you need to start the program from a terminal window. Usually windows users can get a command prompt from the start menu, then accessories, then select command prompt. Also try start menu -> run and enter the "cmd.exe" or "command" and hopefully a window will pop up. You can execute, eg the gui, via:

  c:\python24\python c:\python24\script\ImageD11_gui.py

If it bombs something should be printed. Please READ what is printed. If it makes no sense at all try contacting Jon Wright via wright at esrf point fr for assistance. Your question and the answer stand a good chance of being copied and pasted onto this web page to help future users.

Ubuntu 10.04 Lucid Lynx

Get the dependencies from the package manager:

sudo apt-get install python-numpy-dev python-matplotlib python-image python-pyopengl build-essential

Do an svn checkout of ImageD11, fabio and xfab.

python setup.py build install --prefix=/somewhere export PATH=$PATH:/somewhere/bin export PYTHONPATH=/somewhere/lib/python2.6/site-packages

All is OK except Togl, as usual. Get it from Togl.sourceforge.net:

tar -zxf Togl2.0-8.4-Linux.tar.gz cd Togl2.0-8.4-Linux/lib cp -r Togl2.0 /usr/lib/pymodules/python2.6/OpenGL/Tk/linux2-tk8.5

Dear google, please take note: HOWTO TOGL Togl Ubuntu UBUNTU LUCID 10.04

ASUS Eee PC 4G (xandros linux)

Use control-alt-t to get a terminal up on the screen, then

sudo echo deb http://ftp.fr.debian.org/debian stable main contrib non-free >> /etc/apt/sources.list
sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt-get install python-numpy
sudo apt-get install python-matplotlib
sudo apt-get install python-pyopengl
[ fix Togl.so as described elsewhere on this page, howling in frustration as you do it ]
svn co https://fable.svn.soureforge.net/svnroot/fable/ImageD11/trunk ImageD11
cd ImageD11
python setup.py build setup.py install --home=~/soft/fable
cd ..
svn co https://fable.svn.soureforge.net/svnroot/fable/fabio/trunk fabio
python setup.py build setup.py install --home=~/soft/fable

export PATH=$PATH:~/soft/fable/bin
export PYTHONPATH=$PYTHONPATH:~/soft/fable/lib/python

ImageD11_gui.py
[Say Wahey!]

... and then plug in your external usb disk and wonder if 512 MB ram is going to get you very far ...!

Suse 10.2 - notes from Karthik

Use YaST2 and add installation repositories as following: server: repos.opensuse.org directory: /science/openSUSE_10.2/
and install the following packages:

python-2.5-19
python-tk-2.5-19
python-numeric-24.2-36
python-matplotlib-0.90.0-14-2
python-matplotlib-tk-0.90.0-14-2
python-opengl-2.0.1.09-49
Togl from togl.sf.net download version 1.7
   ./configure
   make
   cp ~/Togl-1.7/libTogl1.7.so /usr/lib/python2.5/site-packages/OpenGL/Tk/linux2-tk8.4/Togl.so
   echo 'dont ask me why'

We think these are the essentials, there might be be others...
Then copy to your ~/.matplotlib/matplotlibrc an rc file from either the template or from the matplotlib.sf.net site. Ensure that the following is in it:

backend      : TkAgg
numerix      : Numeric  # numpy, Numeric or numarray

Then download ImageD11 :

 mkdir ImageD11
 svn co https://fable.svn.sourceforge.net/svnroot/fable/ImageD11
 cd trunk
 python setup.py build
 su -
 python setup.py install
 logout

Now to run - you need an "unlimit" (tcsh) command, or "ulimit" (bash)

 tcsh> unlimit
 tcsh> ImageD11_gui.py

Ubuntu 8.10 (Ibex - Karthik's laptop)

Grab all the needed packages using apt-get (eg, python-numeric, python-numeric-ext, python-matplotlib, python-opengl)
Important is tcl-dev, tk-dev packages. Download Togl-1.7.tar.gz and then

./configure
make
make install (yes, you have to do it)

Bingo it works. For some crazy reason you need not copy the togl.so anywhere else or search in google for forums. (Trust me this happens once in a while in linux).

[karthik@desktop] 2 (/tmp):python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> import numpy.oldnumeric
>>> import PIL
>>> import OpenGL
>>> import OpenGL.Tk
>>> from OpenGL import Tk
>>> from ImageD11 import peaksearcher

Ubuntu 7.04 (Fiesty), id11 laptop

Grab all the needed packages using Synaptic (eg, python-numeric, python-numeric-ext, python-matplotlib, python-opengl)
Get the -dev packages needed so you can compile hello world. Complain to someone that you need to do that.
Do an svn checkout (used eclipse, sorry).

cd ImageD11/trunk
python setup.py build

...if it works it means you already installed the build-essential package to have stdio.h (beggars belief that gcc comes unable to compile helloworld). Otherwise, install that. Then

sudo python setup.py install
cd test
ImageD11_gui.py

If it runs you're happy. If it segfaults then please draw someones attention to the bug report I filed for python-opengl [1] Do this if you're still stuck (you need a pile of other deps).

Togl from togl.sf.net download version 1.7
./configure
make
cp ~/Togl-1.7/libTogl1.7.so /usr/lib/python2.5/site-packages/OpenGL/Tk/linux2-tk8.4/Togl.so

Ubuntu 7.10 (Gutsy), the same ID11 laptop

As for Fiesty, except with some more information:
$ lspci | grep -i ati
...gives the string to search for in ubuntu forums for getting a working xorg.conf ... once you've done that you should have glxgears and glxinfo working ... and compiz, which is nice, eventually.

You need the libc6-dev for the c-standard library, tcl and tk dev packages. Configure Togl with:

 $ ./configure --with-tcl=/usr/lib/tcl8.4 --with-tk=/usr/lib/tk8.4

Then make 2>&1 | more and see you need X11/Xmu and glut dev packages too. Finally make ; make install works, sort of.

Having gotten so close you try to run it and, wait, the repository contains a supository? Gutsy pyopengl is compiled against numarray, which we have not installed. Get Pyopengl, edit the setup.py and do setup.py build install, with numarray/ numeric removed.

Finally it works... but fights with compiz (so turn it off). Axes have disappeared too. Start on installing eclipse for the Java version I guess...

Notes on a standalone installation for redhat 4, thanks to Ken

  1. 3-5-2008 Started over with Python-2.5.2
  1. These are the steps taken to install Python and the packages needed
  2. for ImageD11 into a user-specific location for a user that does not
  3. have root privileges. In this case the location for Python is:

#

  1. ~/linux/Python-2.5.2

#

  1. so that the Python executable is:

#

  1. ~/linux/Python-2.5.2/bin/python2.5

#

  1. Packages were downloaded to:

#

  1. ~/linux/src

#

  1. to be extracted and installed.
  1. The URL of the page from which the packages were downloaded is also
  2. given. However, it would be better to find these packages each time,
  3. as the location or version may have changed.
  1. 1. Install Python
  1. http://www.python.org/download/
  1. Get Python-2.5.2.tgz and put it in ~/linux/src

cd ~/linux/src
gunzip -c Python-2.5.2.tgz | tar xvf -
cd Python-2.5.2
./configure --prefix=$HOME/linux/Python-2.5.2
make
make install

  1. Make a link

ln -s ~/linux/Python-2.5.2 ~/linux/Python

  1. Put this Python at the front of the PATH

setenv PATH ~/linux/Python-2.5.2/bin:${PATH}

  1. Test

Python 2.5.2 (r251:54863, Jan 30 2008, 13:14:34)
[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import sys

import sys
sys.version

'2.5.2 (r252:60911, Mar 5 2008, 16:00:04) \n[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)]'

sys.prefix

'/home/phoebus/EVANS/linux/Python-2.5.2'

sys.exec_prefix

'/home/phoebus/EVANS/linux/Python-2.5.2'

import _tkinter

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named _tkinter

  1. If this test fails it may be because BLT is built with an old version of Tcl/Tk
  2. There will be a line in the Make output like:
    • WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-i686-2.5/_tkinter.so: undefined symbol: TkSetClassProcs
  3. Check this

nm /usr/local/lib/libBLT.a | grep TkSetClassProcs

  1. If this is the case, you can try rebuilding BLT:
  1. 1a. Get BLT
  1. http://blt.sourceforge.net/
  1. Get BLT2.4z.tar.gz and put it in ~/linux/src

cd ~/linux/src
gunzip -c BLT2.4z.tar.gz | tar xvf -
cd BLT2.4z
setenv PATH /usr/lib:~/linux/Python-2.5.2/bin:${PATH}

  1. The value for --with-tcl is where tclConfig.sh is located.
  2. If there is none, see the Togl step below.
  3. Note that it shouldn't need to define exec-prefix

./configure --prefix=$HOME/linux/BLT2.4z --exec-prefix=$HOME/linux/BLT2.4z --with-tcl=/usr/lib
make

  1. Test

cd demos
./graph1.tck
cd ..
make install

  1. Redo step 1. with the new BLT

cd ~/linux/src
cd Python-2.5.2
make clean
make
make install
#Test
Python 2.5.2 (r252:60911, Mar 7 2008, 10:27:29)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import _tkinter

  1. 2. Install NumPy
  1. http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
  1. Get numpy-1.0.4.tar.gz and put it in ~/linux/src

cd ~/linux/src
gunzip numpy-1.0.4.tar.gz
tar xvf numpy-1.0.4.tar
cd numpy-1.0.4
~/linux/Python-2.5.2/bin/python2.5 setup.py install

  1. 3. Install Matplotlib
  1. http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=566411
  1. Get matplotlib-0.91.2.tar.gz and put it in ~/linux/src

cd ~/linux/src
gunzip -c matplotlib-0.91.2.tar.gz | tar xvf -
cd matplotlib-0.91.2
~/linux/Python-2.5.2/bin/python2.5 setup.py install

  1. 4. Install Togl
  1. http://sourceforge.net/project/showfiles.php?group_id=519&package_id=540&release_id=383212
  1. You need tclConfig.sh and tkConfig.sh. These are typically in
  2. /usr/lib. They come with tcl-devel and tk-devel, which are above and
  3. beyond Tcl/Tk itself. If you don't have them, get your sysadmin to
  4. install tcl-devel and tk-devel. (Something like "yum install tcl-devl
  5. tk-devl")
  1. Get Togl-1.7.tar.gz and put it in ~/linux/src

cd ~/linux/src
gunzip -c Togl-1.7.tar.gz | tar xvf -
cd Togl-1.7
./configure --prefix=$HOME/linux/Togl-1.7 --exec-prefix=$HOME/linux/Togl-1.7 --with-tcl=/usr/lib --with-tk=/usr/lib
make
make install

  1. "make install" probably isn't needed. It will install it based on
  2. --prefix and --exec-prefix. Moreoveover, it will fail as it has not
  3. made pkgIndex.tcl (for me anyway). I cannt find in the Makefile where
  4. it would do ths. I made this by hand form pkgIndex.tcl.in by
  5. substituting the appropriate variables from the Makefile. The
  6. contents are:


  1. Tcl package index file

package ifneeded Togl 1.7 \
[list load [file join $dir libTogl1.7.so]]


  1. 5. Install Easy Install (Needed for PyOpenGL)
  1. http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install
  1. Get ez_setup.py and put it in ~/linux/src
  2. Remove PYTHONPATH from the environment
  3. Put installation prefix to Python on the PATH (Probably not necessary)

setenv PATH ~/linux/Python-2.5.2/bin:${PATH}
cd ~/linux/src
~/linux/Python-2.5.2/bin/python2.5 ez_setup.py

~/linux/Python-2.5.2/bin/python2.5 ez_setup.py

Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c7-py2.5.egg
Processing setuptools-0.6c7-py2.5.egg
Copying setuptools-0.6c7-py2.5.egg to /home/phoebus3/EVANS/linux/Python-2.5.2/lib/python2.5/site-packages
Adding setuptools 0.6c7 to easy-install.pth file
Installing easy_install script to /home/phoebus/EVANS/linux/Python-2.5.2/bin
Installing easy_install-2.5 script to /home/phoebus/EVANS/linux/Python-2.5.2/bin

Installed /home/phoebus3/EVANS/linux/Python-2.5.2/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg
Processing dependencies for setuptools==0.6c7
Finished processing dependencies for setuptools==0.6c7

  1. 6. PyOpenGL
  1. http://sourceforge.net/project/downloading.php?group_id=5988&use_mirror=superb-west&filename=PyOpenGL-3.0.0b1.tar.gz&42925303
  2. Get PyOpenGL-3.0.0b1.tar.gz and put it in ~/linux/src

cd ~/linux/src
gunzip -c PyOpenGL-3.0.0b1.tar.gz | tar xvf -
cd PyOpenGL-3.0.0b1
~/linux/Python-2.5.2/bin/python2.5 setup.py install

  1. 6a. Patch PyOpenGL for Togl
  2. This puts Togl where PyOpenGl wants it.
  3. Note that PyOpenGL considers Togl to be deprecated

cd ~/linux/src
cd Togl-1.7
mkdir ~/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/linux2-tk8.4
cp libTogl1.7.so ~/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/linux2-tk8.4/libTogl.so
cp libTogl1.7.so ~/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/linux2-tk8.4
cp pkgIndex ~/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/linux2-tk8.4/Togl.so

  1. 6b. Patch PyOpenGL bugs (May be version dependent)
  1. /home/phoebus/EVANS/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/EGG-INFO:
  2. Fix entry_points.txt:10 by commenting out the Numeric line (Numeric is not installed)

...
#numeric = OpenGL.arrays.numeric:!NumericHandler
...


  1. /home/phoebus/EVANS/linux/Python-2.5.2/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk:
  2. Fix init__.py:82

_default_root.tk.call('lappend', 'auto_path', TOGL_DLL_PATH)