Skip to content

Commit e30cc76

Browse files
Edit install instructions and env .yml (#488)
1 parent 467486c commit e30cc76

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,25 @@ A simple interactive viewer based on VTK classes and written in Python.
1010
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).
1111

1212
## Installation instructions
13-
To install via `conda`, create a **minimal** environment using:
13+
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.
1414

15-
```bash
16-
conda create --name cilviewer ccpi-viewer=25.0.0 -c ccpi -c conda-forge
15+
To install via `conda`:
16+
```sh
17+
conda env create --file Wrappers/Python/conda-recipe/ui_env.yml
1718
```
18-
### Qt embedding
19+
This will install `PySide2` but you could edit the `.yml` to use a different Python-Qt binding.
1920

20-
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.
21+
### Minimal Version
22+
Alternatively, to create a **minimal** environment without the requirements for the UI utilities use:
2123

22-
The environment can be updated to include these (`pyside2`) dependencies as follows:
23-
```sh
24-
conda env update --name cilviewer --file Wrappers/Python/conda-recipe/ui_env.yml
24+
```bash
25+
conda create --name cilviewer ccpi-viewer=25.1.0 -c ccpi -c conda-forge
2526
```
2627

2728
## Run the standalone viewer QApplication
2829

30+
Note: this needs the additional UI requirements (recommended installation above).
31+
2932
- Activate your environment using: ``conda activate cilviewer``.
3033
- Launch by typing: `cilviewer`
3134
- Load a dataset using the File menu. Currently supported data formats:

Wrappers/Python/conda-recipe/ui_env.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
name: cilviewer
1+
name: cilviewer_ui
22
dependencies:
3+
- ccpi::ccpi-viewer=25.1.0
34
- conda-forge::pyside2
45
- conda-forge::eqt>=2.0.0
56
- ccpi::cil-data=22.0.0

0 commit comments

Comments
 (0)