Installing Python

How to install Python depends a lot on your operating system.

macOS

For macOS two popular choices for package managers exist: Homebrew and MacPorts. Both are solid so the choice is up to you, I currently prefer Homebrew.

Homebrew

  1. Install the command line tools via

    $ xcode-select --install
    
  2. Agree to the Xcode license by running

    $ sudo xcodebuild -license
    
  3. Install Homebrew.

  4. Install the required formulas by running

    $ brew install git python3 hdf5 freetype libpng
    

MacPorts

  1. Install the current version of Xcode on your Mac via the Mac App Store.

  2. Open your terminal and install the Xcode Command Line Utilities and run

    $ xcode-select --install
    
  3. Agree to the Xcode license by running

    $ sudo xcodebuild -license
    
  4. Install MacPorts for your version of macOS.

  5. Install the required ports via

    $ sudo port install freetype libpng git hdf5 python35
    

Fedora 25

Install the required packages via

$ sudo dnf install python3-tkinter hdfview

Ubuntu 16.04 LTS

Install the required packages via

$ sudo apt-get install cmake gfortran git libfreetype6-dev libatlas-dev liblapack-dev libhdf5-dev python3-dev python3-venv python3-pip python3-tk

Ubuntu 16.10

Install the required packages via

sudo apt-get install python3-venv python3-tk hdfview