Guide created February 2021
Install these dependencies
sudo apt update
sudo apt -y upgrade
sudo apt install -y make gcc build-essential libgtk-3-dev
sudo apt-get install -y python3-pip openjdk-11-jdk-headless default-libmysqlclient-dev libnotify-dev libsdl2-dev
#If and only if you are building your wxPython not from a wheel, you may need the following libraries:
#Otherwise, skip to the "export" steps
sudo apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkit2gtk-4.0-dev \
libxtst-dev
sudo nano .bashrc
Add this line to your .bashrc
file: export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
Restart your terminal for this change to take effect.
sudo nano /etc/apt/sources.list
Add this line to your /etc.apt/sources.list
: deb http://cz.archive.ubuntu.com/ubuntu bionic main universe
Now you will be able to install libwebkitgtk:
sudo apt-get update
sudo apt-get install libwebkitgtk-1.0-0
We create a Python 3.8 conda environment, and install wxPython and javabridge into it.
conda create -n cellprofiler-dev python=3.8 pip
conda activate cellprofiler-dev
conda install wxPython python-javabridge
Fork/clone the CellProfiler repository if you don't already have this.
git clone [email protected]:CellProfiler/CellProfiler.git
cd CellProfiler
Must change pinned numpy version to "numpy==1.20.1" in CellProfiler setup.py (an upgrade from the current numppy pinned version 1.19.3)
nano setup.py
Editable installation of CellProfiler:
cd GitHub/CellProfiler
pip install -e .
Fork/clone CellProfiler core, if you don't already have this.
cd ..
git clone [email protected]:CellProfiler/core.git
cd core
Editable installation of CellProfiler core:
pip uninstall cellprofiler-core
pip install -e .
Fork/clone centrosome, if you don't already have this.
cd ..
git clone [email protected]:CellProfiler/centrosome.git
cd centrosome
Editable installation of centrosome:
pip uninstall centrosome
pip install -e .
$ python
>>> import wx
>>> import javabridge
>>> # there should be no import errors
$ cellprofiler
$ # you should see the main CellProfiler window open