Installing Karawun
Karawun is python package that can be installed via pip or miniconda.
We recommend that you install Karawun in a python virtual environment to avoid clashes with other packages.
There are a variety of choices of python virtual environments
Conda based installation
Add package channels:
conda config --append channels conda-forge --append channels anaconda --append channels SimpleITK
Create an environment for Karawun:
conda create --name KarawunEnv python=3.8 karawun
Activate the environment:
conda activate KarawunEnv
Test the installation by running the main script:
importTractography -h
This will produce the help information if the installation was successful.
Subsequent uses of karawun only require the conda activate KarawunEnv
step.
Pip based installation
Karawun is available via the Python package index and can be installed using pip
Create and activate your choice of virtual environment.
Install with pip
pip install karawun
Test the installation by running the main script:
importTractography -h
This will produce the help information if the installation was successful.
Verifying your installation
Karawun is tested before packages are distributed. However it is recommended that you duplicate these tests locally, as follows:
Clone the github repository to retrieve the test data (windows users may need to install git separately)
git clone https://github.com/DevelopmentalImagingMCRI/karawun.git
Activate the environment in which Karawun is installed, and install pytest into it. eg.
conda activate KarawunEnv
pip install pytest
Change to the cloned folder
cd karawun
Run the tests
python -m pytest -s tests
The final line should read:
================================================== 3 passed, 2 skipped in 19.35s ===================================================
Skipped tests were run using custom flags to create the baseline results against which new results are compared.