Source installation (Windows) - CellProfiler/CellProfiler GitHub Wiki

Running CellProfiler from Source on Windows (as of v4).

These instructions are for installing CellProfiler 4.0+, and < 5, which will run on Python 3. To install the previous 3.1.9 release, see this page.

Note: an alternative Windows installation is available using miniconda.

  • To obtain the source code from our GitHub repository, you will need to install Git: instructions
  • For those adverse to command lines, we recommend using GitHub for Windows (GFW) or GitKraken
  • After installing GFW, to clone the CellProfiler GitHub repo, do the following:
    • Sign in to your GitHub account on GFW and on the website
    • Browse to the CellProfiler GitHub page
    • On the webpage, click Clone or download -> Open in Desktop
    • It should prompt for the location of the cloned repo. By default, it will place the repository under C:\Users\<username>\Documents\GitHub (in Windows 7/Vista). If you want to place it elsewhere, you can move the cloned folder to a location of your choosing. If you select "Open this repo" in GFW (click on the small right arrow), it will ask for the new location which you can specify with "Find It".
    • Switch to the 4.2.x branch.

Downloading CellProfiler's libraries and dependencies

  • Download and install packages for Python 3.8 64-bit on your machine (older versions of CellProfiler required Python 2.7)

    • We recommend starting with a fresh install of Python.
    • If using Windows do NOT use Python XY, as it only installs as 32 bit.
    • When installing, it's a good idea to enable the "Add python to path" option
  • Download and install Microsoft Visual C++ Redistributable 2015-2022

    • Select the version appropriate for your architecture. On windows, you can determine this by going to Control Panel then searching for System and looking next to "System type:" for your processor architecture.
  • Download and install Microsoft Visual Studio C++ build tools

    • NOTE: Make sure to check 'Desktop development with C++' under Desktop and Mobile in the installer
  • Download and install Java JDK 11

    • You can alternatively install from oracle.com if you'd like, though you will need to make an Oracle account.
  • Access the Windows Environment Variables and make sure that both JAVA_HOME and JDK_HOME are set to the location of your JDK installation (one or both may be set during the installation process, depending on the exact installer you used and your configuration during install).

    • For each new variable, set its value to the location of your JDK installation (i.e., the location of the folder beginning with 'jdk11'). You can do this by clicking the Browse Directory... button. Usually this is in your 'Program Files' in a folder called 'Java'.
  • Open Command Prompt

    • cd into the directory where you cloned CellProfiler
    • Type pip install numpy
    • Type pip install -e .

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 
$ git switch 4.2.x
$ pip3 install -e . 

If you encounter any other errors, please get in touch!

Starting CellProfiler

  • At this point, CellProfiler is installed! You may now run CellProfiler by typing cellprofiler from the command line