User Tools

Site Tools


Downloads (-2016)
Downloads (2016-)
RSS aggregates

EMBL BioImage Data Analysis



—- Contact
CMCI Alumni
EMBL Heidelberg
EMBL Intranet

Popularity Ranking

Timeline of @cmci_

cmci_ avatar

RT @biomicugm: Topics: Biostatistics, computational evolutionary biology, computational genomics and proteomics, graph models, image analys…
About 4 days, 16 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @JustinMCrocker: We are looking for an interdisciplinary EIPOD postdoc to join our group @EMBL! Potential projects with @Eileen_Furlong,…
About 4 days, 16 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @BioImagingUK: This maybe of interest to the @NEUBIAS_COST @openmicroscopy communities #imageAnalysis #imagingScientist
About 4 days, 16 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @BioImagingUK: Software developer position on large image data analysis - working closely with the lab of @bayraktar_lab @sangerinstitut…
About 1 week, 2 days ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @AssafZaritsky: Modeling the interplay of lamellipodial motion and the intercellular actomyosin cable during epithelial wound healing h…
About 1 week, 2 days ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @jytinevez: @florianjug says be careful when using #CARE for intensity based quantification; CARE restoration is like a non linear trans…
About 1 week, 4 days ago by: Kota Miura (@cmci_)
Algorithm FRAP Fiji ImageJ ImageJ Plugin ImageJ Plugin 3Dviewer Imaris Java Javascript Python R bias blog dokuwiki fiji google imagej java libraries matlab meetings neubias news papers python references software webadmin

CMCI weblog

Python Installation and Test Notes (Win32, XP)

Install Python.

  • python-2.6.5.msi

downloaded from

by default, installed under C:\Python26

Then installing site-packages.

Install Numpy and Scipy

  • numpy-1.5.0b1-win32-superpack-python2.6.exe
  • scipy-0.8.0-win32-superpack-python2.6.exe

Both downloaded from the link in

Just clicking and executing.

Install matpotlib.

matplotlib-1.0.0.win32-py2.6.exe downloaded from link in

Install IPython


  • ipython-0.10.win32-setup.exe


and click to install.

check from IDLE:

IDLE 2.6.5      
>>> import IPython
>>> print IPython.__version__

From the program menue, select IPython → Pylab starts up a command line tool that shows

Welcome to IPython. I will try to create a personal configuration directory
where you can customize many aspects of IPython's functionality in:

C:\Documents and Settings\Miura\_ipython
Initializing from configuration: C:\Python26\Lib\site-packages\IPython\UserConfi

Successful installation!

Please read the sections 'Initial Configuration' and 'Quick Tips' in the
IPython manual (there are both HTML and PDF versions supplied with the
distribution) to make sure that your system environment is properly configured
to take advantage of IPython's features.

Important note: the configuration system has changed! The old system is
still in place, but its setting may be partly overridden by the settings in
"~/.ipython/" config file. Please take a look at the file
if some of the new settings bother you.

Please press <RETURN> to start IPython.

Set up environmental variables in Win

  1. new environmental variable “PYTHONPATH” and


  1. add follwoing path to PATH (for commandine)


Test with the following code:

>>> import numpy, scipy
>>> numpy.test()

… then get errors:

Running unit tests for numpy

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
  File "C:\Python26\Lib\site-packages\numpy\testing\", line 321, in test
  File "C:\Python26\Lib\site-packages\numpy\testing\", line 187, in _show_system_info
    nose = import_nose()
  File "C:\Python26\Lib\site-packages\numpy\testing\", line 69, in import_nose
    raise ImportError(msg)
ImportError: Need nose >= 0.10.0 for tests - see

seems that I need to install another module called nose so download the file, unzip. From DOS prompt go into the folder \nose-0.11.2. Then

>C:\temp\nose-0.11.2>python install

according to

I get the following test failure on all msvc9 builds of numpy
for Windows. A patch is attached.


ERROR: test_filename (test_memmap.TestMemmap)
Traceback (most recent call last):
File "X:\Python26-x64\lib\site-
packages\numpy\core\tests\", line 60, in test_filename
WindowsError: [Error 32] The process cannot access the file
because it is being used by another process:

This seems to be already reported.

#1550: Memmap test failure
Reporter: cgohlke | Owner: somebody
Type: defect | Status: closed 
Priority: normal | Milestone: 1.5.0 
Component: Other | Version: devel 
Resolution: fixed | Keywords: 
Changes (by rgommers):

* status: new => closed
* resolution: => fixed


Thanks, applied in r8606, r8607.

for this error, some people say its not really problem:

… so maybe ignore for now and wait for the new release to include the fix above.

Test wiith matplotlib

from DOS command prompt

from pylab import *

this does work. Shows a new window with plot.

Using Pydev in Eclipse (helios)

Install Pydev


set path to the python interpreter in C:\Python26. Then make a new project, and inside create a new python module.

using the same code as above, run the script

—> this does work as well. Shows a new window with plot.

Testing Command line interface (console) in Python

In the bottom console, select “Pydev console” from “Open Console” icon. This will start up interactive python interpreter.

Accessing ImageJ as Image Processing Library

Jython interpreter must be used instead of Python interpreter for accessing Java. For this, pydev installed in eclipse do the job. This is quite useful but the drawback is that one cannot use numpy and scipy. Instead, one should use java numerical libraries as recommended by Albert Cardona.

  1. Basic setting: In eclipse, [Window > Preference], collapse Pydev-Interpreter-Jython tee. If you see nothing listed in “Jython interpreter” field, then you need to set path to a jython interpreter. If you do not have one, you could download the latest from Jython project page ( In my case, I pointed the reference to jython.jar within FIJI jar folder. Since FIJI has automatic updating function, this jar should be the latest one (Python2.5 comparable).
  2. Make a new pydev project by [File > New > Pydev project], Fill “Project name”, choose project type as Jython, and Grammer version 2.5, choose jython (this name is what you gave when you set the library path in 1.) from Interpreter drop down menu.
  3. Right click the newly created project folder and [new > pydev module]. In the creation panel, choose whatever the project name (could also be blank), fill Name of the module (“testjy” in this example) and Finish.
  4. Right click the newly created project folder again, and select “prpoperties”. Select Pydev-PYTHONPATH, select “external libraries” tab, and “Add zip/jar/egg” to set ij.jar as an external library.
  5. optional: to access lugins in ImageJ plugin folder, add that plugin class file or jar file in the library path as well.

Double clicking will open the file in the editor window. COpy and paste the following:

from ij import IJ
import ij.process.ImageProcessor as IP

blobs = IJ.openImage("")
imp = blobs.createImagePlus()
ip = blobs.getProcessor().duplicate()
imp.setProcessor("blobs copy", ip)
ip.setThreshold(147, 147, IP.NO_LUT_UPDATE), "Convert to Mask", ""), "Watershed", "")

save the file, right click the file in Pydeve Package view and select [Run as > Jython Run]. If segmented blob appears, then the setup is working.

To dynamically access jython-ij, set external library path in [window > preferences] interpreter-Jyton pane. Adding ij.jar in the library path will enable you to access jython just like in IDLE by clicking open console icon and selecting pydev console.

entry generator

Weblog Archive

blogtng/blogtop.txt · Last modified: 2016/05/24 05:46 (external edit)