Source installation (OS X and macOS) - CellProfiler/CellProfiler GitHub Wiki
The instructions below list the required steps for installing CellProfiler 4, which runs on Python 3. These instructions were tested on MacOS Catalina (version 10.15).
Setting up MacOS environment
Install Homebrew:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install OpenJDK
Find out what version of java is currently being shipped by homebrew
$ brew update
$ brew info java
You can get the latest version if prokaryote supports it with
$ brew install java
Otherwise, Java11 is the most up-to-date Java LTS (LongTermSupport) release and can be installed with
$ brew install java11
(For installing other versions of Java with homebrew see AdoptOpenJDK )
If homebrew tells you to softlink and/or add Java to your path at the end of installation, be sure to do so. Otherwise, any versions you install will not be visible in the next step.
Get the exact name of your available Java versions
$ ls /Library/Java/JavaVirtualMachines/
Set your JAVA_HOME
environment variable by adding it to your .zshrc
or .bashrc
(depending on the Shell used).
- For example, if your Java installation is located at
/Library/Java/JavaVirtualMachines/openjdk-14.0.2.jdk/Contents/Home
then add the following to your.zshrc
:export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-14.0.2.jdk/Contents/Home"
- Don't forget to source your .zshrc file
$ source ~/.zshrc
Install Python 3
- Before installing python, you'll need to have GCC installed. This can be obtained by downloading XCode. Make sure you have an updated version of XCode, which can be downloaded from the Mac App Store.
- If using a fresh installation of Xcode, you'll need to run
xcode-select --install
in your terminal:
$ brew install [email protected]
If CellProfiler will run in a Conda environment, the python.app
package is required. To install it:
$ conda install -n YOUR_ENV python.app
Install MySQL:
$ brew install mysql
Running CellProfiler from Source
Option 1 - pip
pip3 install cellprofiler
Option 2 - cloning
Install CellProfiler in your directory of choice (here set to $HOME/CellProfiler
):
$ git clone https://github.com/CellProfiler/CellProfiler.git $HOME/CellProfiler
$ cd CellProfiler
$ pip3 install -e .
Run CellProfiler by typing:
$ cellprofiler
If CellProfiler will run in a Conda environment, or if you receive a message stating that the "program needs access to the screen", then run CellProfiler by typing:
$ pythonw -m cellprofiler
If you run into errors, especially any with cellprofiler_core
in the stack trace, you may want to also clone and install CellProfiler-core from source; if you do this, you will typically need to also pull core whenever pulling your CellProfiler master.
$ git clone https://github.com/CellProfiler/core.git
$ cd core
$ pip3 install -e .