installing CellProfiler2 on Ubuntu 14.04 / Mint 17.3

19 Apr

Another one in the long series of same same, but different installation instructions for CellProfiler:

The following has been tested on a fresh Linux Mint 17.3.

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 \
    build-essential \
    cython \
    git \
    libpython-stdlib \
    openjdk-7-jdk \
    python-h5py \
    python-lxml \
    python-matplotlib \
    python-mysqldb \
    python-pandas \
    python-pip \
    python-scipy \
    python-skimage \
    python-vigra \
    python-wxgtk2.8 \
    python-wxgtk2.8 \
    python-zmq \

Install additional Python packages

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

/usr/bin/pip install --user --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.

/usr/bin/pip install --user --no-deps -vvv prokaryote

Prepare the environment

export JAVA_HOME="/usr/lib/jvm/java-7-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
cd CellProfiler/

Not (yet) covered: integration of Ilastik