Skip to content

CellProfiler Analyst Developer's version installation for Mac

Beth Cimini edited this page Feb 10, 2020 · 30 revisions

Note: We also offer a [vagrant solution] (https://github.com/CellProfiler/metabolism).

CPA developer's version used to require CP to be installed, but it should be independent with the javabridge, etc. now factored out (afaik). Nevertheless, these notes are using my Mac (10.9) which already had CP developer's version working (May 2014).

pip install javabridge

pip install python-bioformats

pip install verlib

pip install mock (not sure if this is strictly necessary, but it was also listed in requirements.txt here so I pip-installed it)

Run CPA with (still from within virtualenv)

python ./<YOUR CPA GITHUB DIR>/CellProfiler-Analyst.py

Java issues

To see what Java versions are installed on your system, use the command below; as of CPA 2.2.1 Java8 (or OpenJDK8) is required.

/usr/libexec/java_home -V

Matching Java Virtual Machines (3):
    11.0.2, x86_64:	"OpenJDK 11.0.2"	/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
    1.8.0_192, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
    1.8.0_51, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home

To set JAVA_HOME on your system to a Java8/JDK8 installation, get the version from the Java8 install on your machine (ie on mine, I will use 1.8.0_192) - note that the second step is copying the line into a file, at which point you can save and close it (with Ctl+O then Ctl+X)

$ nano ~/.bash_profile 

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_192)

$ source ~/.bash_profile

$ echo $JAVA_HOME

Tweaks

After installation, you might want to check the page [https://github.com/CellProfiler/CellProfiler-Analyst/wiki/CellProfiler-Analyst-Developer-Tweaks](CellProfiler Analyst Developer Tweaks) for relevant optimizations and performance tweaks.