Cellprofiler Linux setup issue

Dose anyone facing issues below when install CP3.1.9 in linux?
Collecting centrosome (from CellProfiler==3.1.9)
Using cached https://files.pythonhosted.org/packages/ac/01/7f46b624571a67082e8db4c2441609eefe05c655b3baca71316025122d95/centrosome-1.1.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-vbVLHx/centrosome/setup.py”, line 84
SyntaxError: invalid syntax


Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-vbVLHx/centrosome/


1 Like

It seems it the issue of the new version of centrosome

Are you using Python 2? Looking at the syntax for the lines in question:

__extensions += [
        sources=["centrosome/{}.{}".format(name, __suffix)],

The comma at the end of the list of input arguments doesn’t work on Python 2, it only works on 3.

You can get around it by installing Centrosome first in one of a couple different ways:
-You could simply use an older version of by typing “pip install centrosome==1.1.6” (I think 1.1.6 still works as written with python 2)
-If you really want centrosome 1.1.7, do the following in a new directory:

  1. $ git clone https://github.com/CellProfiler/centrosome
  2. $ cd centrosome
  3. $ gedit setup.py (or open it in any other text editor)
  4. manually delete the comma after “extkwargs” in line 84, and save setup.py
  5. $ pip install . (yes, enter a period)

That should install centrosome directly from the cloned github code, but edited to make it behave, and worked for me on Python 2. Someone else submitted an issue on github and hopefully they’ll make that edit in the source code soon.


Awesome, do appreciate your help!

Awesome thanks! I was having this issue too.