.. _software_installation: ============================================================= Downloading and installing software for this class ============================================================= Rather than downloading and installing this software, you might want to consider using the :ref:`vm`, which already contains everything you need. Registered students can also get an account on a Linux machine in the Applied Mathematics Department at UW to do your work if desired, a machine with all this software already installed. Registered class members can visit the `class Catalyst webpage `_ for information on how to obtain an account. Then see :ref:`ssh` for information on how to use these machines. It is assumed that you are on a Unix-like machine (e.g Linux or Mac OS X). For some flavors of Unix it is easy to download and install some of the required packages using apt-get_, or your system's package manager; many Python packages can also be installed using easy_install_. Notes about this are provided below. If you insist on using a Windows machine (not recommended for high-performance scientific computing in general), then you will need to either download and install [VirtualBox]_ for Windows and then run the :ref:`vm` to provide a Linux environment, or else use :ref:`cygwin`. Some of this software may already be available on your machine. The *which* command in Unix will tell you if a command is found on your *search path*, e.g.:: $ which python /usr/bin/python tells me that when I type the python command it runs the program located in the file listed. Often executables are stored in directories named *bin*, which is short for *binary*, since they are often binary machine code files. If *which* doesn't print anything, or says something like:: $ which xyz /usr/bin/which: no xyz in (/usr/bin:/usr/local/bin) then the command cannot be found on the *search path*. So either the software is not installed or it has been installed in a directory that isn't searched by the shell program (see :ref:`shells`) when it tries to interpret your command. See :ref:`unix_path` for more information. Versions -------- Often there is more than one version of software packages in use. Newer versions may have more features than older versions and perhaps even behave differently with respect to common features. For some of what we do it will be important to have a version that is sufficiently current. For example, Python has changed dramatically in recent years. Everything we need (I think!) for this class can be found in Version 2.X.Y for any :math:`X \geq 4`. Major changes were made to Python in going to Python 3.0, which has not been broadly adopted by the community yet (because much code would have to be rewritten). In this class we are *not* using Python 3.X. (See [Python-3.0-tutorial]_ for more information.) To determine what version of software you have installed, often the command can be issued with the ``--version`` flag, e.g.:: $ python --version Python 2.5.4 Individual packages ------------------- Python ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If the version of Python on your computer is older than 2.4.0 (see above), you should upgrade. See ``_ or consider the EPD described below. Enthought Python Distribution (EPD) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You might consider installing the EPD (free for academic users, see ``_). This includes a recent version of Python 2.X as well as many of the other Python packages listed below (IPython, NumPy, SciPy, matplotlib, mayavi). EPD works well on Windows machines too. IPython ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The IPython shell is much nicer to use than the standard Python shell (see :ref:`shells` and :ref:`ipython`). (Included in EPD.) See ``_ NumPy and SciPy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Used for numerical computing in Python (see :ref:`numerical_python`). (Included in EPD.) See ``_ Matplotlib ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Matlab-like plotting package for 1d and 2d plots in Python. (Included in EPD.) See ``_ Mercurial ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Version control system (see :ref:`hg`). See ``_ Sphinx ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Documentation system used to create these class notes pages (see :ref:`sphinx`). See ``_ gfortran ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GNU fortran compiler (see :ref:`fortran`). You may already have this installed, try:: $ which gfortran See ``_ OpenMP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Included with gfortran (see :ref:`openmp`). Open MPI ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Message Passing Interface software for parallel computing (see :ref:`mpi`). See ``_ LAPack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Linear Algebra Package, a standard library of highly optimized linear algebra subroutines. LAPack depends on the BLAS (Basic Linear Algebra Subroutines); it is distributed with a reference BLAS implementation, but more highly optimized BLAS are available for most systems. See ``_ .. _apt-get: Software available through *apt-get* ------------------------------------ On a recent Debian or Ubuntu Linux system, most of the software for this class can be installed through *apt-get*. To install, type the command:: $ sudo apt-get install PACKAGE where the appropriate PACKAGE to install comes from the list below. NOTE: You will only be able to do this on your own machine, the VM described at :ref:`vm`, or a computer on which you have super user privileges to install software in the sytsem files. (See :ref:`sudo`) You can also install these packages using a graphical package manager such as Synaptic instead of *apt-get*. If you are able to install all of these packages, you do not need to install the Enthought Python Distribution. ======================== ================= Software Package ======================== ================= Python python IPython ipython NumPy python-numpy SciPy python-scipy Matplotlib python-matplotlib Python development files python-dev Mercurial mercurial Sphinx python-sphinx gfortran gfortran OpenMPI libraries libopenmpi-dev OpenMPI executables openmpi-bin LAPack liblapack-dev ======================== ================= Many of these packages depend on other packages; answer "yes" when *apt-get* asks you if you want to download them. Some of them, such as Python, are probably already installed on your system, in which case *apt-get* will tell you that they are already installed and do nothing. .. _easy_install: Software available through *easy_install* ----------------------------------------- *easy_install* is a Python utility that can automatically download and install many Python packages. It is part of the Python *setuptools* package, available from ``_, and requires Python to already be installed on your system. Once this package is installed, you can install Python packages on a Unix system by typing:: $ sudo easy_install PACKAGE where the PACKAGE to install comes from the list below. Note that these packages are redundant with the ones available from *apt-get*; use *apt-get* if it's available. ========== ======================== Software Package ========== ======================== IPython IPython[kernel,security] NumPy numpy SciPy scipy Matplotlib matplotlib Mayavi mayavi Mercurial mercurial Sphinx sphinx ========== ======================== If these packages fail to build, you may need to install the Python headers.