Installing STIR with conda: Difference between revisions
stir>Krthie →Installing STIR with conda: fixed linebreaks |
stir>Krthie →Installing STIR with conda: use environment |
||
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 | 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]. |
Revision as of 06:38, 12 June 2021
Installing STIR with conda
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.