Much of the material in this document is taken from Appendix H.1 in the book A Primer on Scientific Programming with Python, 4th edition, by the same author, published by Springer, 2014.
Anaconda is a free Python distribution produced by Continuum Analytics and contains about 200 Python packages, as well as Python itself, for doing a wide range of scientific computations. Anaconda can be downloaded from http://continuum.io/downloads. Choose Python version 2.7.
The Integrated Development Environment (IDE) Spyder is included with Anaconda and is my recommended tool for writing and running Python programs on Mac and Windows, unless you have preference for a plain text editor for writing programs and a terminal window for running them.
Spyder is started by typing spyder
in a (new) Terminal application.
If you get an error message unknown locale, you need to type the
following line in the Terminal application, or preferably put the line
in your $HOME/.bashrc
Unix initialization file:
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
Anaconda installs the pip
tool that is handy to install additional
packages. In a Terminal application on Mac or in a PowerShell terminal
on Windows, write
pip install --user packagename
The SciTools package can be installed by pip
on Mac:
Terminal> pip install --user -e \
git+https://github.com/hplgit/scitools.git#egg=scitools
The safest procedure on Windows is to go to https://github.com/hplgit/scitools/ and click on Download ZIP. Double-click on the downloaded file in Windows Explorer and perform Extract all files to create a new folder with all the SciTools files. Find the location of this folder, open a PowerShell window, and move to the location, e.g.,
Terminal> cd C:\Users\username\Downloads\scitools-2db3cbb5076a
Installation is done by
Terminal> python setup.py install