Import bug in (git:master)

Hi guys,

I’m trying to run CPA on my linux workstation. I’ve got the CP 2.1.1 installed on the same, which runs fine.
I think there’s an import mismatch that might work on your local machines (and on the Windows & OSX versions) but not in linux: line 8 imports a module called javabridge directly:

which results in the following error

[quote]lee@beehive:~/projects/CellProfiler-Analyst$ python
Traceback (most recent call last):
File “”, line 8, in
import javabridge
ImportError: No module named javabridge

The most current CP code imports the javabridge module like so:

and making the corresponding change on line 8 of brings me to the properties file loading screen, as expected. Is this a bug? Or should I be making a change to my PYTHONPATH that isn’t presently described when running CPA2 fresh from checking out the source from github?



Hi Lee,

We have factored out the Javabridge as a separate Python module now:
On my Mac I just installed via pip install javabridge but I haven’t tried on Linux.

Does that help? I will ping our Linux guru if not.


Actually, do “pip install python-bioformats” so you get bioformats also. Does that help?

CPA has been using the factored-out javabridge and bioformats packages since rev. bac6bb2. I added python-bioformats to requirements.txt right now (although I think that requirements file is incomplete).

Aha, thanks folks. After installing python-bioformats with pip (which installed javabridge) everything seems to work fine.

OK good! Thanks for reporting back.