Source installation (Ubuntu 16.04 LTS)

Mario Emmenlauer edited this page Jun 27, 2018 · 15 revisions

This procedure has been confirmed to work on a clean install of Ubuntu 16.04. First install system prerequisites for CellProfiler with apt. You will have to confirm the list of installed packages:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install \
    build-essential    \
    cython             \
    git                \
    libmysqlclient-dev \
    libhdf5-dev        \
    libxml2-dev        \
    libxslt1-dev       \
    openjdk-8-jdk      \
    python-dev         \
    python-pip         \
    python-h5py        \
    python-matplotlib  \
    python-mysqldb     \
    python-scipy       \
    python-numpy       \
    python-vigra       \
    python-wxgtk3.0    \

Checkout the CellProfiler sources:

$ git clone
$ cd CellProfiler

Its possible to use a specific branch or tag of CellProfiler. The latest stable version is in branch 'stable', or specific versions can be found in tags. I.e. to use the latest stable, use:

$ git checkout stable

or to use version 2.2.0, use:

$ git checkout 2.2.0

Finally when you have checked out the version you want, you are ready to start the compile / install of python dependencies.

$ sudo pip install --editable .

Alternatively, you can install CellProfiler into your home directory (preferred):

$ pip install --user --editable .

If you get an error ImportError: No module named Cython.Build run

pip install --upgrade cython

When using pip with --user, it will install CellProfiler and its dependencies in the platform-specific user install directory. It is possible to get the install directory from Python itself using the site module. This may be something like $HOME/.local, so the packages may be installed in $HOME/.local/bin.

$ python -m site --user-base

Add this directory to your PATH environment variable to start pip-installed packages:

$ export PATH="$HOME/.local/bin:$PATH"


$ cellprofiler

will run CellProfiler.

Issues and Workarounds

There is an issue in 2.2.0 that breaks the java bindings in prokaryote. To work around the issue, its sufficient to re-install prokaryote from the CellProfiler source directory:

pip uninstall prokaryote
pip install prokaryote

If you get this error:

File "/tmp/easy_install-YiEaoP/javabridge-1.0.15/", line 137, in ext_modules
File "/usr/lib/python2.7/", line 122, in dirname
  i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Be sure to use java 8:

sudo update-alternatives --config java

Uninstalling CellProfiler

pip uninstall cellprofiler
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.