Source Installation (Ubuntu 14.04 LTS)

Claire McQuin edited this page Jan 10, 2017 · 19 revisions

This procedure has been confirmed to work on a clean install of Ubuntu LTS 14.04. You need root (or sudo) access for this to work.

The commands given here use the latest development CP version from git. See below if you want another version.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install \
  cython             \
  git                \
  libmysqlclient-dev \
  libhdf5-dev        \
  libxml2-dev        \
  libxslt1-dev       \
  openjdk-7-jdk      \
  python-dev         \
  python-pip         \
  python-h5py        \
  python-matplotlib  \
  python-mysqldb     \
  python-scipy       \
  python-vigra       \
  python-wxgtk2.8    \
  python-zmq
sudo pip install --upgrade cython
sudo pip install dask
sudo pip install --upgrade six
sudo git clone https://github.com/CellProfiler/CellProfiler.git /opt/CellProfiler
cd /opt/CellProfiler/
sudo pip install --editable . --process-dependency-links
sudo pip uninstall prokaryote
sudo pip install prokaryote
sudo pip install javabridge

The following instructions were used to create an EC2 AMI (ami-f44bb099) on Ubuntu Server 14.04 LTS:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install \
  cython             \
  default-jdk        \
  git                \
  libmysqlclient-dev \
  libhdf5-dev        \
  python-pip         \
  python-h5py        \
  python-matplotlib  \
  python-mysqldb     \
  python-scipy       \
  python-vigra       \
  python-lxml        \
  python-pandas      \
  python-scipy       \
  python-sklearn     \
  python-wxgtk2.8    \
  python-zmq         \
  unzip

sudo -H pip install --upgrade cython
sudo -H pip install --upgrade scikit-image
sudo git clone https://github.com/CellProfiler/CellProfiler.git /opt/CellProfiler
cd /opt/CellProfiler
sudo git checkout stable
sudo pip install -e . --process-dependency-links

Running CellProfiler

You can then run CellProfiler, which has been installed in /opt/CellProfiler, as a normal user. The recommended way to do this is:

$ cd /opt/CellProfiler
$ python CellProfiler.py

Installing a different version

WARNING: Depending on the version, this may need other dependencies, so you may need to do additional steps which are not included in the commands above.

To install the stable version or some specific release of CP instead, first select the one you want from the 'Branch' menu on the CP GitHub page at https://github.com/CellProfiler/CellProfiler. This will give you a URI pointing to the source for that CP version (e.g., https://github.com/CellProfiler/CellProfiler/tree/release_2.1.1 if you want to install CP release_2.1.1). In the git clone command below, replace the default checkout URI (https://github.com/CellProfiler/CellProfiler.git) with that URI.

Uninstalling CellProfiler and dependencies

To uninstall CellProfiler, delete the source directory at /opt/CellProfiler. Then delete the executable script from /usr/local/bin/cellprofiler. Optionally, you can also remove the python dependency packages at /usr/lib/python2.7/dist-packages, but beware that python dependency packages might be used by other python tools as well! The full instructions are:

rm -fr /opt/CellProfiler
rm -fr /usr/local/bin/cellprofiler
rm -fr /usr/lib/python2.7/dist-packages/*

Running an example pipeline

mkdir ~/tmp && cd ~/tmp
sudo apt-get install unzip
wget http://d1zymp9ayga15t.cloudfront.net/content/Examplezips/ExampleHumanImages.zip && unzip ExampleHumanImages.zip
find $PWD/ExampleHumanImages -name "*.tif"  > filelist.txt 
cellprofiler -r -c -p  ExampleHumanImages/ExampleHuman.cppipe --file-list=$PWD/filelist.txt -o .
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.