weatherbox:visualization:tutorials:installing_matplotlib

Installing Matplotlib

Our code runs on Python 2.7.

  1. Install Homebrew by running the following command:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Python 2.7
    brew install python
  3. Install several Python packages
    1. mpmath: an arbitrary precision math library
      pip install mpmath
    2. numpy: numerical python library
      pip install numpy
    3. scipy: scientific python library
      pip install scipy
    4. ipython: useful python shell
      pip install ipython
  4. Install Matplotlib
    1. First, install pkg-config which helps to configure matplotlib when it is compiled.
      brew install pkg-config
    2. Next, install the freetype and libpng libraries which matplotlib accesses when compiling.
      brew install freetype
      brew install libpng
    3. Next, install the ffmpeg library which allows us to save movies when using matplotlib.
      brew install ffmpeg
    4. Lastly, install matplotlib.
      pip install matplotlib
  5. To compile code written in python enter:
    python < name of file >

I referenced this website for installing python: http://www.lecloud.net/post/119427148455/python-pip-on-mac-os-x-yosemite I referenced this website for installing the packages and matplotlib: http://www.tapir.caltech.edu/~dtsang/python.html

Authors

Contributing authors:

cobatake

Created by cobatake on 2015/11/13 05:45.

  • weatherbox/visualization/tutorials/installing_matplotlib.txt
  • Last modified: 2021/09/19 21:59
  • (external edit)