2. Installation and Upgrades

2.1. Requirements

2.1.1. Python

AIMBAT is built on top of standard Python and uses several extra Python libraries as well. We develop and test AIMBAT on Python versions 3.6 and newer. AIMBAT may run on older versions too, but we strongly suggest upgrading Python should you be running an older version (not just for AIMBAT!).

2.1.2. Compilers

2.1.2.1. Fortran

Fortran is an optional dependency used to compile a fast cross-correlation routine during AIMBAT installation. AIMBAT will fall back to a Python cross-correlation routine if Fortran is not available, but it is slower. We therefore highly recommend installing a Fortran compiler (e.g. gfortran).

2.1.2.2. C

While AIMBAT itself does not use C, some of the Python libraries it uses potentially require a C compiler during installation. This may vary depending on computer platform, or Python version/distribution used.

2.1.3. Operating System

AIMBAT is designed to run on UNIX like systems (e.g. Mac OSX and Linux). Installation on Windows is probably possible (since Python can be installed on almost any platform), though untested.

2.2. Installing AIMBAT

2.2.1. pip - Python package installer

AIMBAT is available as a package from the Python Package Index. This means it can be easily installed with the pip command (available by default since Python version 3.4).

Caution

It is possible to have multiple versions of Python installed on a computer. If this is the case, then there will also be multiple versions of the pip command. It is therefore important to use the pip command belonging to the Python version you intend to use for AIMBAT! Running pip --version will show you which Python version it belongs to.

Note

On some systems Python 2 and Python 3 are installed alongside eachother. Typically there is a pip command belonging to Python 2 and a pip3 command belonging to Python 3.

2.2.2. conda users

If you are using conda to manage Python packages, we recommend installing AIMBAT dependencies with conda before installing AIMBAT with pip. To do so issue this command:

$ conda install scipy numpy matplotlib pyqtgraph pyyaml pyproj

Note

Similarly, if you are using a package manager on Linux, or something like brew or macports on OSX, you may want to install these dependencies (if available) via those mechanisms instead of pip.

2.2.3. Installing AIMBAT with pip

To install the latest stable version of AIMBAT and all dependencies not already installed, simply issue this command:

$ pip install pysmo.aimbat

Caution

Unless you know what you are doing, we recommend to not install AIMBAT with administrative priveliges (i.e. using sudo or the root account). If the above command fails due to insuffienct rights, run the same command with the --user flag:

$ pip install --user pysmo.aimbat

If you wish to install the latest developement version of AIMBAT instead of the stable release:

$ pip install git+https://github.com/pysmo/aimbat

Note

It is possible to install the stable release alongside the development version. Please read Developing AIMBAT for instructions.

2.2.4. Example Data

Get the repository data-example from Github. There is some example code inside data-example/example_pkl_files that will be needed for later demonstrations.

2.3. Upgrading AIMBAT

Upgrading AIMBAT with pip is done with the same command used to install, with the addition of the -U flag:

$ pip install -U pysmo.aimbat

Note

If you used the --user flag during installation you also need to use it while upgrading

2.4. Uninstalling AIMBAT

To remove aimbat from your system with pip run this command:

$ pip uninstall pysmo.aimbat

Note

Unfortunately pip currently does not remove dependencies that were automatically installed. We suggest running pip list to see the installed packages, which can then also be removed using pip uninstall