If you are using the Virtual Computer, you can skip this step.
This section describes the installation of Anaconda on your own computer, to provide Matplotlib, Numpy, and other third-party code. You still need to install CODAS software after this step.
These instructions for installing Anacondas are specific to a reasonably recent Mac, but most of the steps are similar on other machines. Some notes about other platforms are included. The Anaconda software distribution provides platform-independent package management for Python and other software in self-contained user-specific environments.
The instructions also assume that you are installing most things from scratch; if you have remnants of earlier installations or attempts, conflicts could occur, and these can be very confusing and difficult to track down.
(1) Install Anaconda base
To begin, install the current Anaconda base that matches your operating system. You will need to enter your email address. (Don’t worry, this does not trigger an avalanche of spam.) To process ADCP data with CODAS software, you MUST install the Python 2 (default) version. Use the the default location for installation, which will be the anaconda subdirectory in your home directory. When the installation has finished, you will have an extensive Python-based suite of software.
The installer will have put the anaconda/bin subdirectory at the head of your PATH environment variable in your .bash_profile. When you start a new terminal session, it should therefore find the Anaconda versions of python, ipython, etc.
(2) Install additional Anaconda packages
One of the new commands that will be found in anaconda/bin is conda, which is the package management tool. Use this to install additional packages that we will need:
conda install basemap conda install netcdf4 conda install wxpython conda install future
(3) Install Mercurial
Install the Mercurial package directly from the origin; it will work with the Python 2 version that is included with OS X. (In general, it is best not to install packages into the OS X Python; this is an exception.)
(4) Install a C compiler (OS X only)
You will need the C compiler that goes with OS X. You can get it by installing all of Xcode (it’s huge), and then the command-line tools, or you can just install the latter directly. You need only the command-line tools, not the whole Xcode package; at least on Mavericks and Yosemite you can get them quickly (assuming you have a network connection) by invoking:
On Linux, the C compiler (gcc) is usually installed by default and is always available from the native package manager. On Windows it is available from Anaconda:
conda install mingw
(5) Aliases for WxPython (OSX only)
Because of the way the Anaconda Python was built on OSX, in order to run programs that use Wx (i.e. the graphical programs), you must specify that they should be run with pythonw (instead of the default python). For example:
pythonw ~/anaconda/bin/dataviewer.py xyz
There are several ways around this, but perhaps the easiest is to add the following aliases to your .bashrc:
alias dv='pythonw `which dataviewer.py` ' alias fv='pythonw `which figview.py` .' alias gg='pythonw `which gautoedit.py` -n5'
With these aliases, use the 2-letter abbreviation instead of the whole name:
If you do not already have a working .bashrc file, you should add the following to your .bash_profile to be sure the .bashrc is sourced appropriately:
if [ -f "$HOME/.bashrc" ] ; then source $HOME/.bashrc fi
(6) Install CODAS software
Now you are ready to install CODAS software