Makefile.CP2 does install required "readline" Python module

Hello,
I recently succeeded in installing CellProfiler 2.1.2 (rev cfb4b61, cloned June 20 from the GitHub repo) on Debian Wheezy with Option 1: Using the makefile (https://github.com/CellProfiler/CellProfiler/wiki/CellProfiler-Developer%27s-version-installation-for-Linux).

Today I tried to run a pipeline for the first time and encountered the following error when running an analysis:

Progress Counter({u'Unprocessed': 1}) Starting workers on address tcp://127.0.0.1:62445 Worker 0: Traceback (most recent call last): Worker 0: File "/home/kmdouglass/cp2/src/CellProfiler/cellprofiler/analysis_wo rker.py", line 149, in <module> Worker 0: from cellprofiler.utilities.rpdb import Rpdb Worker 0: File "/home/kmdouglass/cp2/src/CellProfiler/cellprofiler/utilities/r pdb.py", line 22, in <module> Worker 0: import readline # otherwise, pdb.Pdb.__init__ hangs Worker 0: ImportError: No module named readline

This occurred when I clicked the “Analyze Images” button after loading the pipeline file and the images (the human cells example found here: http://www.cellprofiler.org/examples.shtml#HumanCells). In CellProfiler, I waited for two minutes but no update to the progress bar was made, presumably because of this problem.

readline is in my primary Python site installation:

[code]kmdouglass@kmd-laptop1:~/cp2/src/CellProfiler$ /usr/bin/python
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import readline
print readline.doc
Importing this module enables command line editing using GNU readline.[/code]

but it is not in the Python installation that was installed with the Makefile:

[code]kmdouglass@kmd-laptop1:~/cp2/src/CellProfiler$ ~/cp2/bin/python2.7
Python 2.7.2 (default, Jun 20 2015, 21:03:32)
[GCC 4.7.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import readline
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named readline[/code]

The Makefile should be updated to install this module along with the other CP2 sources.

Cheers,
Kyle

Hi Kyle,
I’m hoping you can do a pip install of readline to work around this (github.com/CellProfiler/CellPro … ssues/1389

Thanks Lee.

I realize now that when I built the Python that came with CP I didn’t have the libreadline-dev package installed. I’ll try running the Makefile again next week and see whether it’s included in the build.

Cheers,
Kyle

Hi Lee and everyone else,
I just installed readline using pip and now the human cells example runs without errors. I probably won’t try rebuilding Python with the libreadline-dev package since 1) it’s working with the pip solution and 2) I don’t have the time :wink:

export READLINE="/home/kmdouglass/cp2/lib/python2.7/site-packages" pip install --target=$READLINE readline

Note to anyone building CellProfiler dependencies with the Makefile: I used ~/cp2/ as the install folder and not ~/usr/cp2/ as explained in the wiki installation instructions for the Linux developer code (https://github.com/CellProfiler/CellProfiler/wiki/CellProfiler-Developer%27s-version-installation-for-Linux). All my notes for installing CellProfiler using the Makefile.CP2 option on Debian Wheezy are here: http://kmdouglass.github.io/stories/notes/cellprofiler.html

Kyle

Great - thanks for sharing your experience!
David