{ "cells": [ { "cell_type": "markdown", "metadata": { "toc": "true" }, "source": [ "# Table of Contents\n", "
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Introduction to Python\n", "\n", "Often there already is an installed version of Python on MacOs and Linux operating systems.\n", "Whatever the case it is advised to always only one version of Python; preferably the one installed\n", "by the package manager.\n", "\n", "There still is the possibility to install a *distribution* coming with the most used packages.\n", "This the recommended method for Windows user.\n", "\n", "## Installation of a Python distribution:\n", "\n", "There are several Python distributions aimed at scientists:\n", "* [Anaconda](https://store.continuum.io/cshop/anaconda/)\n", "* [Canopy](https://www.enthought.com/products/canopy/)\n", "* [Python(x,y)](https://code.google.com/p/pythonxy/)\n", "\n", "Each of these is available for wide range of architectures (32/64 bits, Linux, Windows, Mac OS...).\n", "At the time of writing Anaconda seems to be the simplest to install and offering a very good compatibility multi-platform.\n", "\n", "## Installing packages: \n", "\n", "Each of these distributions comes with a set of scientific modules (numpy, scipy, pandas...) and developer tools (spyder, ipython). Python is an open language, it is possible to install other modules developed by the community or co-worker.\n", "\n", "Several tools for the package management exist. Either the package manager of your system (if Python is installed this way). Or by the manager of your python distribution. For example, to install *vtk* with the Anaconda distribution, a terminal must be opened and run in it:\n", "```bash \n", "conda install vtk\n", "```\n", "\n", "If a desired module is not available by the system/distribution manager, there exist a Python module called *pypi* allowing to install a wider range of modules.\n", "\n", "Those tools connect to on-line repositories and usually manage from the downloading to installation.\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Spyder\n", "\n", "Spyder is graphical user interface (gui) copied from the Matlab interface.\n", "\n", "