Skip to content

dependencies

Dominic Ford edited this page Feb 27, 2019 · 15 revisions

4GP Dependencies

Before installing 4GP, you need to make sure that you have all the software packages which are required to build Turbospectrum, 4FS, and the other tools that 4GP wraps.

4GP has currently only been tested on python 3.5, and so you will need to have access to this version of Python.

In addition, the following external packages and libraries are required:

  • git - required to check the code out from GitHub
  • SQLite3 - including the python-sqlite3 binding; you can test for this by typing import sqlite3 into a python terminal
  • python3-matplotlib - required to use the 4GP Spectrum Browser and the Cannon; you can test for this by typing import matplotlib into a python terminal
  • python3-tk - required to use the 4GP Spectrum Browser and the Cannon; you can test for this by typing import tkinter into a python terminal
  • pyxplot - required to produce plots of the Cannon's performance

The following packages are strongly recommended:

  • python-virtualenv - required to set up a python virtual environment

The following packages are needed to run certain parts of 4GP:

  • libchealpix-dev - required to build and install 4FS
  • python3-healpy - required to build and install 4FS
  • libcfitsio3-dev - required to build and install 4FS
  • gfortran - required to build and install Turbospectrum
  • pyphot - required to do photometry on spectra
  • MySQL - including the libmysqlclient and python-mysql bindings - currently only required by the 4GP unit tests, so not very important

Ubuntu installation instructions

Under Ubuntu Linux, you can install all these packages with the in-built package manager, as follows:

Ubuntu 18.04

apt-get install git python-sqlite mysql-server libmysqlclient-dev python-virtualenv libhealpix-cxx-dev libchealpix-dev libcfitsio-dev python3-healpy gfortran python3-tk python3-matplotlib sqlite3 python3-dev

The visualisation scripts use a plotting package called Pyxplot, which is unfortunately not packaged within Ubuntu 18.04. You can download it and build it from source as follows:

git clone https://github.com/dcf21/pyxplot9.git
cd pyxplot9/
./configure
make
sudo make install

Ubuntu 16.04

apt-get install git python-sqlite mysql-server libmysqlclient-dev python-virtualenv libhealpix-cxx-dev libchealpix-dev libcfitsio3-dev python3-healpy gfortran python3-tk python3-matplotlib sqlite3 python3-dev pyxplot

Ubuntu 14.04

Note that owing to this issue described on StackOverflow, the pipeline runs very slowly on Ubuntu 14.04.

apt-get install git python-sqlite mysql-server libmysqlclient-dev python-virtualenv libcfitsio3-dev libblas-dev liblapack-dev libblas3gf liblapack3gf gfortran python3-tk python3-matplotlib sqlite3 python3-dev pyxplot
apt-get build-dep python3-matplotlib