Installation¶
General Requirements¶
LabOne Q requires Python 3.9 or higher. To ease the maintenance of
multiple installations and software packages, it is recommended to use
Python environments through e.g. venv
, uv
, or conda
.
LabOne Q also requires an installation of the Zurich Instruments LabOne Software. LabOne and LabOne Q follow a frequent release cycle with updates, performance improvements and new features. LabOne Q always supports the most recent LabOne release and currently requires LabOne version 25.01. Changes to this are mentioned in the release notes.
Latest Release¶
The following command will install the latest officially released LabOne Q version. Make sure to run this command in the Python environment into which LabOne Q should be installed.
pip install --upgrade laboneq
Setup for Development¶
A development setup is only needed if you need deeper insights into the software or when you want to contribute to the development. The LabOne Q repository is found here: https://github.com/zhinst/laboneq
git clone git@github.com:zhinst/laboneq.git <YOUR_DIR>
cd <YOUR_DIR>
We recommend using uv
to manage the Python
environment for development, including Python itself.
The latest version of uv
can be installed as follows:
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Please follow the installation instructions on the uv
website for details.
To update (or create) a development environment for LabOne Q, run the following
uv sync
# note:
# add --python <VER> to use a specific Python version
# add --all-extras to install optional dependencies
# add --all-groups to install all development dependencies
# add --no-install-project to avoid installing LabOne Q itself
# add --config-setting 'build-args=--profile=dev' to build Rust code in debug mode
# add --frozen to avoid updates of the lock file
# add --locked to ensure that the lock file remains unchanged
and then activate it:
. .venv/bin/activate
.venv\Scripts\Activate
The previous step installs LabOne Q in editable mode, so that changes to the source code are immediately available in the Python environment.
Note
LabOne Q contains code written in Rust. To build the Rust code, you must have a Rust toolchain available. You can install Rust by following the instructions on the Rust website.
When working with Rust code in LabOne Q, the extension module can be compiled
with maturin
:
maturin develop --uv --skip-install # add --release for a release build
To build wheels for distribution, you can use maturin
as follows to create a
wheel for the current platform in the wheels
directory:
maturin build --release --out wheels