CCPEM Pipeliner
Guide

Installation

Installing ccpem-pipeliner with pip and checking the setup with pipeliner.check_setup


Overview

This page explains how to install ccpem-pipeliner using pip and verify that the installation is complete and functional. A correct installation gives you both the pipeliner command-line entry point and the pipeliner Python package, which together form the foundation for building and running cryoEM processing workflows. Running pipeliner.check_setup after installation confirms that all console scripts are in place and shows you which external programs (such as RELION) are available on your system.


Prerequisites

Before you begin, ensure the following are available in your environment:

  • Python ≥ 3.9 — the package declares support for Python 3.9 through 3.14; CI runs on 3.10.
  • pip — used to install the package and register its console scripts.
  • Internet access (or a local PyPI mirror) — required to download ccpem-pipeliner and its dependencies from PyPI.
  • Optional: RELION — needed to run RELION-based job types; pipeliner.check_setup will report these as unavailable if RELION is not on your PATH.
  • Optional: MPI runtime (e.g., OpenMPI) — required only if you intend to run MPI-parallel jobs locally.
  • Optional: HPC cluster scheduler (e.g., SLURM, SGE) — required only for queue-based job submission.

No other system-level services or daemons are needed. The package is a pure Python library/SDK that installs console scripts via pip entry points.


Installation

1. (Recommended) Create and activate a virtual environment

Working in a virtual environment avoids conflicts with other Python packages.

python3 -m venv venv/
source venv/bin/activate

2. Install from PyPI

pip install ccpem-pipeliner

This installs the pipeliner Python package and registers all console scripts, including pipeliner, pipeliner.check_setup, pipeliner.recover_project, pipeliner.regenerate_results, pipeliner.bfactor_plot, and pipeliner.update_metadata_schema.

3. (Alternative) Install from source

If you are working from a local clone of the repository, navigate into the ccpem-pipeliner directory and run:

pip install -e .

The -e flag installs the package in editable mode so that changes to the source are reflected immediately without reinstalling.

4. (Optional) Install development dependencies

If you intend to run tests or contribute to the codebase:

pip install -e .[dev]

This adds pytest, black, flake8, mypy, pre-commit, and related type stubs.

5. Verify console scripts are on your PATH

After installation, confirm that the entry-point scripts were registered:

which pipeliner
which pipeliner.check_setup

Both commands should return a path inside your virtual environment's bin/ directory. If either is missing, see the Troubleshooting section.


Usage

Checking your installation

Run pipeliner.check_setup immediately after installing to confirm the setup is complete:

pipeliner.check_setup

The command prints four sections:

  1. Python version check — confirms the Python interpreter version.
  2. Available job types check — iterates over every registered job type and reports Success (with the executable path) or Unavailable (with the missing command name) for each one.
  3. Pipeliner setup check — verifies that the six core console scripts (pipeliner, pipeliner.bfactor_plot, pipeliner.update_metadata_schema, pipeliner.recover_project, pipeliner.check_setup, pipeliner.regenerate_results) can be found on your PATH.
  4. Final setup report — summarises the result.

The three possible final messages are:

MessageMeaning
SUCCESS: The pipeliner and all job types appear to be correctly installed and ready to useEverything is installed and all external programs were found.
The pipeliner is correctly installed, but some jobs are unavailableThe pipeliner itself is correctly installed; some external programs (e.g., RELION, MotionCor2) are not on your PATH. This is normal for a fresh install.
The pipeliner is not installed correctlyOne or more of the six core console scripts could not be found. Reinstall the package.

Making external programs available

Job types whose required executables are missing load normally but are marked unavailable (jobinfo.is_available = False). You do not need every external program to use pipeliner — only the jobs you intend to run need their executables. Add executable directories to your PATH, or list them in the PIPELINER_ADDITIONAL_PROGRAM_PATHS environment variable (colon-separated directory paths):

export PIPELINER_ADDITIONAL_PROGRAM_PATHS="/opt/relion/bin:/opt/ctffind/bin"
pipeliner.check_setup

Using the settings file

On first import, pipeliner attempts to create a settings file at:

  • Linux: ~/.config/ccpem/pipeliner/ccpem-pipeliner-settings.json (or $XDG_CONFIG_HOME/ccpem/pipeliner/ccpem-pipeliner-settings.json if XDG_CONFIG_HOME is set)
  • macOS: ~/Library/Application Support/ccpem/pipeliner/ccpem-pipeliner-settings.json

If the directory is not writable, pipeliner logs a warning and continues using built-in defaults; settings can still be overridden via environment variables at any time. Environment variables with the PIPELINER_ prefix take precedence over those with the RELION_ prefix, which in turn take precedence over values in the settings file.


Examples

Example 1: Fresh install and setup check

pip install ccpem-pipeliner
pipeliner.check_setup

On a system where RELION is not installed, the final report will read:

The pipeliner is correctly installed, but some jobs are unavailable

Example 2: Install in a virtual environment and check setup

python3 -m venv ~/envs/pipeliner-env
source ~/envs/pipeliner-env/bin/activate
pip install ccpem-pipeliner
pipeliner.check_setup

Example 3: Verify the Python API is importable

After installation you can confirm the package imports correctly:

import pipeliner
print(pipeliner.__version__)

Example 4: Check setup with additional program paths set

If your RELION installation is in a non-standard location, point pipeliner to it before checking:

export PIPELINER_ADDITIONAL_PROGRAM_PATHS="/opt/relion-5/bin"
pipeliner.check_setup

Example 5: Install from source in editable mode

git clone https://gitlab.com/ccpem/ccpem-pipeliner.git
cd ccpem-pipeliner
pip install -e .
pipeliner.check_setup

Troubleshooting

pipeliner.check_setup reports ERROR: console scripts not found

Symptom: The "checking pipeliner setup" section shows ERROR for one or more of pipeliner, pipeliner.check_setup, pipeliner.recover_project, etc.

Cause: pip installed the package but did not register the entry-point scripts — this can happen after an interrupted install or when the environment's bin/ directory is not on PATH.

Fix:

pip install --force-reinstall ccpem-pipeliner

For an editable install from a source checkout, run pip install -e . from the repository root instead; pip install --force-reinstall ccpem-pipeliner would replace the editable install of your checkout with the release from PyPI. Also ensure your virtual environment or pip install prefix bin/ directory is on PATH.


Job types show Unavailable after install

Symptom: pipeliner.check_setup lists job types as Unavailable with '<command>' missing from system path.

Cause: The external program (e.g., relion_run_motioncorr, ctffind, MotionCor2) is not on your PATH. The job type loads correctly but is marked unavailable.

Fix: Add the directory containing the executable to PIPELINER_ADDITIONAL_PROGRAM_PATHS (colon-separated list of directories, not executable paths):

export PIPELINER_ADDITIONAL_PROGRAM_PATHS=/path/to/relion/bin
pipeliner.check_setup

To make this permanent, set the value in ~/.config/ccpem/pipeliner/ccpem-pipeliner-settings.json (Linux) or ~/Library/Application Support/ccpem/pipeliner/ccpem-pipeliner-settings.json (macOS).


RuntimeError when accessing a pipeliner setting on an unsupported platform

Symptom: Importing pipeliner logs Unable to set up pipeliner python environment, and calling a settings getter raises RuntimeError: Platform "<name>" is not supported.

Cause: pipeliner only supports Linux and macOS. On any other platform it logs a warning at import time and raises RuntimeError on first settings access.

Fix: Run pipeliner on a supported Linux or macOS system.


Settings file warning at startup

Symptom: A log warning appears: CCP-EM Pipeliner could not create a settings file at <path>. Settings can still be set using environment variables.

Cause: The directory ~/.config/ccpem/pipeliner/ (Linux) or ~/Library/Application Support/ccpem/pipeliner/ (macOS) is not writable by the current user.

Fix: Either fix the directory permissions or supply all required settings via environment variables (e.g., PIPELINER_ADDITIONAL_PROGRAM_PATHS, PIPELINER_MPIRUN_COMMAND). Pipeliner continues to work correctly using built-in defaults when the settings file cannot be written.


import pipeliner logs Unable to set up pipeliner python environment

Symptom: A warning is printed during import but pipeliner otherwise loads.

Cause: An exception was raised while pipeliner set up its environment at import time, for example on an unsupported platform (anything other than Linux or macOS), where reading the settings raises RuntimeError (see above). This is non-fatal at import. A missing script listed in PIPELINER_PATH_TO_SOURCE_FILES, or one that fails, does not cause this warning: it is skipped without any message. A missing script, or one that stops with exit, adds none of its environment variables; scripts are sourced with ., so they do not need to be executable.

Fix: Run pipeliner on Linux or macOS. To check the scripts in the path_to_source_files setting (or PIPELINER_PATH_TO_SOURCE_FILES), source each one in a shell yourself, then remove or correct any that fail.


pip install ccpem-pipeliner fails due to dependency conflicts

Symptom: pip reports incompatible dependency versions during install.

Fix: Install into a fresh virtual environment to avoid conflicts with other packages:

python3 -m venv venv/
source venv/bin/activate
pip install ccpem-pipeliner