Cellprofiler Linux setup


Anyone can help me with the installation of Cellprofiler 3.1.8 in Ubuntu 16.04?

I’ve followed the steps of the installation (https://github.com/CellProfiler/CellProfiler/wiki/Source-installation-(Ubuntu-16.04-LTS)), and tried to use the version of 3.1.8 via

git checkout v3.1.8

The installation looks ok.

But when I run cellprofiler, this information appears:

ubuntu@cellprofiler:~$ cd CellProfiler/
ubuntu@cellprofiler:~/CellProfiler$ cellprofiler
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/cellprofiler", line 11, in <module>
    load_entry_point('CellProfiler', 'console_scripts', 'cellprofiler')()
  File "/home/ubuntu/CellProfiler/cellprofiler/__main__.py", line 122, in main
    raise ValueError("You must specify a pipeline filename to run")
ValueError: You must specify a pipeline filename to run

The other issue is that the error I got from the Ubuntu interface directly looks different:

It seems that the GUI tried to pop-up but failed.
Peter Lu

Hi Peter,

I don’t think it’s possible to get CP 3.whatever to work on linux in headless mode. See my post here: CellProfiler install from source and run headless to solve batch processing memory errors Also see here: CellProfiler 4.0.0 timeline and roadmap

Since my post I’ve been using CP2 on ubuntu. Works great. If you get CP3 working let us know! -John

Hi John,

Thanks for your reply.
I get CP 3.1.8 working in Ubuntu16.04 to run the example pipelines (ExampleFly) in the data example.

Also, I am able to use 3.1.8 to run my designed pipelines now.

Though I’m also a beginner using Cellprofiler in Linux(ubuntu 16.04), my experience may help install this software:

  1. Just follow the first steps in this tutorial for ubuntu 16.04 here: https://github.com/CellProfiler/CellProfiler/wiki/Source-installation-(Ubuntu-16.04-LTS)

  2. When come to git check out, do

git checkout v3.1.8

  1. Upgrade pip from 8.1.1 to 9.0.1:

sudo python -m pip install --force-reinstall pip==9.0.1

  1. Install the python dependencies

sudo -H pip install .

  1. Upgrade pillow:

sudo -H pip uninstall pillow
sudo -H pip install pillow

  1. Run the Fly example:

cd cellprofiler/data/examples
find $PWD/ExampleFly/images/ -name “*.TIF” > filelist.txt

""quote symbol may not work, open the .txt to confirm the path of input image files

cat filelist.txt

cellprofiler -r -c -p ExampleFly/ExampleFly.cppipe --file-list=$PWD/filelist.txt -o .

Peter Lu

1 Like

Yes! You’re right, I got it working as well. Thanks for the check out tip and the encouragement. Great job! I did this:

sudo pip install pip==9.0.1
sudo pip install Pillow==4.3.0

and had to do this:
sudo pip install docutils==0.14

An CP3.1.8 seems to work in headless mode. Awesome! I was hesitating to reply though because the new problem is that big images are causing a java heap space error and it appears the “–java-heap-size” option on the command line was dropped after CP2.

I see this post here: https://github.com/CellProfiler/CellProfiler/issues/2048 but I’m not understanding how to use that in the command line. What I’ve tried so far hasn’t worked.


1 Like

Here we go. I ran this command before running the command to start CP:

export _JAVA_OPTIONS="-Xms32000m -Xmx32000m"

The underscore in front of the JAVA part appears to be important. Now when it’s CP is running it says “Picked up JAVA…”

1 Like

I am having problem in setting up CP3.1.8 in Ubuntu 16.04. I installed couple of weeks back, after a biit of struggle it was working fine. For the past two week again I am an issue as follows, here is the screenshot. It looks like an issue with h5py.


Really do not know how to solve your issue when I’m also new to use CP in ubuntu. But please let us know when you solve it~ Thanks!


I fixed the problem. The problem was h5py version. CP is looking for h5py 2.7 version i guess but I had 2.5. Whenever I try to update it was updating in the latest python (3.7) version. Actually I had two versions of python 2.7 & 3.7, but I was trying to run CP using 2.7 and so it was not working with the old h5py version. I removed both the python reinstalled 2.7. Once I complete the CP installation, I installed 3.7. Its working fine now.

Cool, that’s great!!

Actually, now I’m facing another problem:
when I run my dataset in batches, the error of “(worker) memory error” would appear.

I have 5 channels of each image sets, each image is smaller than 2M.


Dear Peter_Lu,

You can increase the number of workers in the preferences based on your capacity of the computer you are using.


Fujfilm Wako Automation (Consultant)

Hi Lakshmi,

Thanks for your suggestion. Actually, cellprofiler is able to detect the number of available VCPUs and adjust the number of workers automatically if using the GUI.
In my case, the default number of workers is 16, while my memory is only 32 GB. Now I decrease the number of workers to 6, no memory error appears.

Peter Lu

Hi Peter_Lu,



Fujfilm Wako Automation (Consultant)