From 73bb13a7af222ffe6bca11fddf22c97297b22a53 Mon Sep 17 00:00:00 2001 From: Murgatroyd Date: Fri, 28 Nov 2025 11:26:19 +0000 Subject: [PATCH] Edit install instructions and env .yml --- README.md | 19 +++++++++++-------- Wrappers/Python/conda-recipe/ui_env.yml | 3 ++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f81920b5..4fe52de8 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,25 @@ A simple interactive viewer based on VTK classes and written in Python. Examples of QApplications are the [`iviewer`](Wrappers/Python/ccpi/viewer/iviewer.py) and the [`standalone viewer`](Wrappers/Python/ccpi/viewer/standalone_viewer.py). An example of use in an external software is [iDVC](https://github.com/TomographicImaging/iDVC). ## Installation instructions -To install via `conda`, create a **minimal** environment using: +We recommend installing with additional requirements needed to run the [UI utilities](Wrappers/Python/ccpi/viewer/ui) for embedding the viewer in Qt applications. These include `eqt>=2.0.0` and one Python-Qt binding, such as `PySide2`, `PySide6` or `PyQt5`. The [UI examples](Wrappers/Python/examples/ui_examples) require `cil-data` as well. -```bash -conda create --name cilviewer ccpi-viewer=25.0.0 -c ccpi -c conda-forge +To install via `conda`: +```sh +conda env create --file Wrappers/Python/conda-recipe/ui_env.yml ``` -### Qt embedding +This will install `PySide2` but you could edit the `.yml` to use a different Python-Qt binding. -To embed the viewer in Qt applications we provide extra [UI utilities](Wrappers/Python/ccpi/viewer/ui). To use those, the environment needs to include the extra requirements `eqt>=2.0.0` and one Python-Qt binding, such as `PySide2`, `PySide6` or `PyQt5`. The [UI examples](Wrappers/Python/examples/ui_examples) require `cil-data` as well. +### Minimal Version +Alternatively, to create a **minimal** environment without the requirements for the UI utilities use: -The environment can be updated to include these (`pyside2`) dependencies as follows: -```sh -conda env update --name cilviewer --file Wrappers/Python/conda-recipe/ui_env.yml +```bash +conda create --name cilviewer ccpi-viewer=25.1.0 -c ccpi -c conda-forge ``` ## Run the standalone viewer QApplication +Note: this needs the additional UI requirements (recommended installation above). + - Activate your environment using: ``conda activate cilviewer``. - Launch by typing: `cilviewer` - Load a dataset using the File menu. Currently supported data formats: diff --git a/Wrappers/Python/conda-recipe/ui_env.yml b/Wrappers/Python/conda-recipe/ui_env.yml index 28fe6555..24f5df39 100644 --- a/Wrappers/Python/conda-recipe/ui_env.yml +++ b/Wrappers/Python/conda-recipe/ui_env.yml @@ -1,5 +1,6 @@ -name: cilviewer +name: cilviewer_ui dependencies: + - ccpi::ccpi-viewer=25.1.0 - conda-forge::pyside2 - conda-forge::eqt>=2.0.0 - ccpi::cil-data=22.0.0