Installing STIR with conda: Difference between revisions

From STIR
stir>Krthie
m 3 revisions imported
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= Installing STIR with conda =
= Installing STIR with conda =


Users of conda (Anaconda, miniconda etc) can install STIR without compilation:
Users of conda (Anaconda, miniconda etc) can install STIR without compilation. The following creates a conda environment which includes both STIR and matplotlib:
 
<pre>
<pre>
conda config --add channels conda-forge
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set channel_priority strict
conda install stir
conda create -n stirenv  stir matplotlib
conda activate stirenv
 
# use STIR executable
OSMAPOSL some.par
 
# use Python
python
>>> import stir
 
# deactivate the environment
conda deactive
</pre>
</pre>
See the [https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html conda documentation on managing environments] for more information. Note that conda recommends installing all packages that you want at the same time, so you probably want to add other packages to the list above.


This should work on Linux and Windows. A MacOS package is still pending end 2020, check current status in [https://github.com/conda-forge/stir-feedstock/issues/9 the relevant issue]
This should work on Linux and Windows. A MacOS package is still pending end 2020, check current status in [https://github.com/conda-forge/stir-feedstock/issues/9 the relevant issue]


For more details, check the [https://github.com/conda-forge/stir-feedstock STIR feedstock].
For more details, check the [https://github.com/conda-forge/stir-feedstock STIR feedstock].

Latest revision as of 00:13, 21 November 2024

Installing STIR with conda[edit]

Users of conda (Anaconda, miniconda etc) can install STIR without compilation. The following creates a conda environment which includes both STIR and matplotlib:

conda config --add channels conda-forge
conda config --set channel_priority strict
conda create -n stirenv  stir  matplotlib
conda activate stirenv

# use STIR executable
OSMAPOSL some.par

# use Python
python
>>> import stir

# deactivate the environment
conda deactive

See the conda documentation on managing environments for more information. Note that conda recommends installing all packages that you want at the same time, so you probably want to add other packages to the list above.

This should work on Linux and Windows. A MacOS package is still pending end 2020, check current status in the relevant issue

For more details, check the STIR feedstock.