installing CellProfiler2 on Ubuntu 15.04

25 Feb

Again, some things have changed since 11.10.

The following has been tested on a fresh Ubuntu “server” installation, 15.04.

The goal of these instructions is to use packages provided by the Linux distribution wherever possible, and to install the rest in a non-obtrusive way in the user’s home directory (to avoid conflicts or unexpected behavior of the system). In other words: there is no excessive use of sudo here, as in many other how-to’s out there…

Prepare Ubuntu packages

First all packages that are available through Ubuntu’s own repositories will be installed. This includes Python itself, its required packages, git and Java:


sudo apt-get install —yes \ cython \ git \ openjdk-8-jdk \ python-h5py \ python-lxml \ python-matplotlib \ python-mysqldb \ python-pandas \ python-pip \ python-scipy \ python-skimage \ python-vigra \ python-wxgtk3.0 \ python-zmq

Install additional Python packages

Some of the required packages are not available through Ubuntu, so they have to be installed manually.

pip install —no-deps \
    javabridge        \
    python-bioformats \
    hmmlearn          \
    centrosome        \
    cellh5

Now there is one remaining package which has to be shown to be particularly nasty during installation while creating this how-to, that is prokaryote. My recommendation is to install it in verbose mode, so you can see what’s going on, especially as it has to retrieve a quite large JAR file (>130 MB) from github, which can sometimes be extremely slow.

pip install —no-deps -vvv prokaryote

Prepare the environment

export JAVA_HOME=”/usr/lib/jvm/java-8-openjdk-amd64”
export LD_LIBRARY_PATH=”$JAVA_HOME/jre/lib/amd64/server”

Get CellProfiler and run it

Beware that if you’re connected via ssh, make sure to enable X-forwarding (e.g. by using ssh -X for connecting) to be able to display CellProfiler’s GUI.

git clone https://github.com/CellProfiler/CellProfiler.git
cd CellProfiler/
python CellProfiler.py 

Not (yet) covered: integration of Ilastik