Alternative installation methods
Installing RAFT uses pipx, which handles the isolated environment
for you. This page covers the cases where that is not what you want: no
pipx available, a distribution old enough to predate PEP 668, or a need
to know exactly where the environment lives.
Why the environment is isolated
RAFT is a command-line application, so it is best installed into an
environment of its own. Current Debian and Ubuntu releases, and any other
distribution enforcing PEP 668, refuse to let pip install into the
system Python at all:
error: externally-managed-environment
pipx and a virtual environment both avoid that. pip install --user does
not: PEP 668 blocks it along with every other system-Python install.
Using a virtual environment
If you would rather not add pipx, create the environment yourself:
$ sudo apt install -y python3-full
$ python3 -m venv ~/raft-venv
$ ~/raft-venv/bin/pip install reproducible-analyses-framework-and-tools
Then put the environment’s bin/ directory on your $PATH so the command
is available in new shells:
$ echo 'export PATH="$HOME/raft-venv/bin:$PATH"' >> ~/.bashrc
$ source ~/.bashrc
Older systems
On distributions predating PEP 668 enforcement, a user-level install still works:
$ pip install --user reproducible-analyses-framework-and-tools
Depending on your environment, you may need to add ~/.local/bin to your
$PATH.
Confirming the installation
$ raft --help
raft --version reports the installed version, and the commit as well when
RAFT is running from a checkout. Every installation above leaves the system
Python untouched, and none of them affect raft install-dependencies, which
installs Java, Nextflow, and Apptainer at the system level.
Note
pip install --break-system-packages also works and is sometimes
suggested for the externally-managed-environment error, but it installs
RAFT and roughly fifty dependencies, among them awscli,
cryptography, grpcio, and protobuf, into the Python your
operating system itself depends on. Prefer one of the isolated
installations above.