How To Install python-nibabel on Debian 9

In this tutorial we learn how to install python-nibabel on Debian 9. python-nibabel is Python bindings to various neuroimaging data formats

Introduction

In this tutorial we learn how to install python-nibabel on Debian 9.

What is python-nibabel

python-nibabel is:

NiBabel provides read and write access to some common medical and neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2), GIFTI, NIfTI1, MINC, as well as PAR/REC. The various image format classes give full or selective access to header (meta) information and access to the image data is made available via NumPy arrays. NiBabel is the successor of PyNIfTI.

This package also provides a commandline tools:

  • dicomfs - FUSE filesystem on top of a directory with DICOMs
  • nib-ls - ’ls’ for neuroimaging files
  • parrec2nii - for conversion of PAR/REC to NIfTI images

There are three methods to install python-nibabel on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-nibabel Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-nibabel using apt-get by running the following command:

sudo apt-get -y install python-nibabel

Install python-nibabel Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-nibabel using apt by running the following command:

sudo apt -y install python-nibabel

Install python-nibabel Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-nibabel using aptitude by running the following command:

sudo aptitude -y install python-nibabel

How To Uninstall python-nibabel on Debian 9

To uninstall only the python-nibabel package we can use the following command:

sudo apt-get remove python-nibabel

Uninstall python-nibabel And Its Dependencies

To uninstall python-nibabel and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python-nibabel

Remove python-nibabel Configurations and Data

To remove python-nibabel configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python-nibabel

Remove python-nibabel configuration, data, and all of its dependencies

We can use the following command to remove python-nibabel configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-nibabel

Dependencies

python-nibabel have the following dependencies:

References

Summary

In this tutorial we learn how to install python-nibabel package on Debian 9 using different package management tools: apt, apt-get and aptitude.