Installation
This guide contains instructions for installing Cell-ACDC in different ways. In the future a video will be added.
Installation using Anaconda (recommended)
- Install Anaconda or Miniconda (make sure to use the 64-bit version for Windows)
Anaconda is a distribution of Python, which helps with package management and simplifies many aspects of using Python. Python is a programming language and needs an interpreter to function. Miniconda is a lightweight implementation of Anaconda.
- Open the terminal (for Windows use the anaconda terminal)
A terminal is a text-based way to communicate with the computer. The anaconda terminal is a terminal specifically for anaconda, with some commands specific to anaconda only available there.
- Update conda by typing
conda update conda This will update all programmes (or packages) that are part of conda.
- Update conda by typing
- Create a virtual environment by typing
conda create -n acdc python=3.9 This will create a virtual environment, which is an isolated instance and partially independent from the rest of the system. The virtual environment is called
acdcin this case.
- Create a virtual environment by typing
- Activate the virtual environment by typing
conda activate acdc This will activate the environment, meaning that the console is now not in the default system environment, but the
acdcenvironment. If the activation of the environment was successful, this should be indicated to the left of the active path, circled in red below.
- Activate the virtual environment by typing
- Update pip using
python -m pip install --upgrade pip Pip is an application which is included in Python. It manages programmes and updates it. In this case, we tell pip to update itself.
- Update pip using
- Install Cell-ACDC using
pip install "cellacdc[gui]" This tells pip to install Cell-ACDC, specifically the version with an user interface.
- Install Cell-ACDC using
Advanced install methods
The following part of the guide is intended for users who are interested in changing Cell-ACDC’s code.
IMPORTANT: Before installing with other methods
If you are new to Python or you need a refresher on how to manage scientific Python environments, I highly recommend reading this guide by Dr. Robert Haase BEFORE proceeding with Cell-ACDC installation.
Installation using Pip
Windows
Download and install Python 3.9. Make sure to check the checkbox so python is added to PATH, as seen in the picture below. This is so you can access python commands from anywhere.
Open a terminal. On Windows we recommend using the PowerShell that you can install from here. On macOS use the Terminal app.
Upgrade pip: Windows:
py -m pip install --updgrade pip, macOS/Unix:python3 -m pip install --updgrade pipNavigate to a folder where you want to create the virtual environment
Create a virtual environment: Windows:
py -m venv acdc, macOS/Unixpython3 -m venv acdcActivate the environment: Windows:
.\acdc\Scripts\activate, macOS/Unix:source acdc/bin/activateInstall Cell-ACDC with the command
pip install "cellacdc[gui]". Note that if you know you are going to need tensorflow (for segmentation models like YeaZ) you can run the commandpip install "cellacdc[all]", orpip install tensorflowbefore or after installing Cell-ACDC.
Install from source
If you want to try out experimental features (and, if you have time, maybe report a bug or two :D), you can install the developer version from source as follows:
Open a terminal and navigate to a folder where you want to download Cell-ACDC. If you are on Windows you need to use the “Anaconda Prompt” as a terminal. You should find it by searching for “Anaconda Prompt” in the Start menu.
Clone the source code with the command
git clone https://github.com/SchmollerLab/Cell_ACDC.git. If you are on Windows you might need to installgitfirst. Install it from here.Navigate to the
Cell_ACDCfolder with the commandcd Cell_ACDC.Update conda with
conda update conda. Optionally, consider removing unused packages with the commandconda clean --allCreate a new conda environment with the command
conda create -n acdc_dev python=3.9Activate the environment with the command
conda activate acdc_devUpgrade pip with the command
python -m pip install --upgrade pipInstall Cell-ACDC with the command
pip install -e .. The.at the end of the command means that you want to install from the current folder in the terminal. This must be theCell_ACDCfolder that you cloned before.OPTIONAL: If you need tensorflow run the command
pip install tensorflow.
Updating Cell-ACDC installed from source
To update Cell-ACDC installed from source, open a terminal window, navigate to the Cell_ACDC folder and run the command
git pull
Since you installed with the -e flag, pulling with git is
enough.
Install from source with forking
If you want to contribute to the code or you want to have a developer version that is fixed in time (easier to get back to in case we release a bug :D) we recommend forking before cloning:
Create a personal GitHub account and log in.
Go to the Cell-ACDC GitHub page and click the “Fork” button (top-right) to create your own copy of the project.
Open a terminal and navigate to a folder where you want to download Cell-ACDC. If you are on Windows you need to use the “Anaconda Prompt” as a terminal. You should find it by searching for “Anaconda Prompt” in the Start menu.
Clone the forked repo with the command
git clone https://github.com/your-username/Cell_ACDC.git. Remember to replace theyour-usernamein the command. If you are on Windows you might need to installgitfirst. Install it from here.Navigate to the
Cell_ACDCfolder with the commandcd Cell_ACDC.Add the upstream repository with the command
git remote add upstream https://github.com/SchmollerLab/Cell_ACDC.gitUpdate conda with
conda update conda. Optionally, consider removing unused packages with the commandconda clean --allCreate a new conda environment with the command
conda create -n acdc_dev python=3.9. Note thatacdc_devis the name of the environment and you can call it whatever you like. Feel free to call it justacdc.Activate the environment with the command
conda activate acdc_devUpgrade pip with the command
python -m pip install --upgrade pipInstall Cell-ACDC with the command
pip install -e .. The.at the end of the command means that you want to install from the current folder in the terminal. This must be theCell_ACDCfolder that you cloned before.OPTIONAL: If you need tensorflow run the command
pip install tensorflow.
Updating Cell-ACDC installed from source with forking
To update Cell-ACDC installed from source, open a terminal window, navigate to the Cell-ACDC folder and run the command
git pull upstream main
Since you installed with the -e flag, pulling with git is
enough.