Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
weatherbox:visualization:tutorials:installing_matplotlib [2015/11/13 05:48] cobatake |
weatherbox:visualization:tutorials:installing_matplotlib [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
</code> | </code> | ||
- | - | + | - Install Python 2.7 <code> |
+ | brew install python | ||
+ | </code> | ||
+ | - Install several Python packages | ||
+ | - mpmath: an arbitrary precision math library<code> | ||
+ | pip install mpmath | ||
+ | </code> | ||
+ | - numpy: numerical python library<code> | ||
+ | pip install numpy | ||
+ | </code> | ||
+ | - scipy: scientific python library<code> | ||
+ | pip install scipy | ||
+ | </code> | ||
+ | - ipython: useful python shell<code> | ||
+ | pip install ipython | ||
+ | </code> | ||
+ | - Install Matplotlib | ||
+ | - First, install pkg-config which helps to configure matplotlib when it is compiled.<code> | ||
+ | brew install pkg-config | ||
+ | </code> | ||
+ | - Next, install the freetype and libpng libraries which matplotlib accesses when compiling.<code> | ||
+ | brew install freetype | ||
+ | brew install libpng | ||
+ | </code> | ||
+ | - Next, install the ffmpeg library which allows us to save movies when using matplotlib.<code> | ||
+ | brew install ffmpeg | ||
+ | </code> | ||
+ | - Lastly, install matplotlib. <code> | ||
+ | pip install matplotlib | ||
+ | </code> | ||
+ | - To compile code written in python enter:<code> | ||
+ | python < name of file > | ||
+ | </code> | ||
+ | |||
+ | 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 | ||