Skip to content

Euroscipy 2017 tutorial requirements

Olivier Grisel edited this page Aug 26, 2017 · 39 revisions

Tutorials are hands-on sessions, therefore you should bring your own laptop.

You can either install a selection of packages necessary for the tutorials (using pip or conda, or your OS package manager), or install a distribution which ships a large number of Python packages (which is recommended if you're using Windows), such as Anaconda or Canopy.

Required packages for all tutorials

  • Python
  • NumPy
  • SciPy
  • Matplotlib
  • Jupyter notebook

Intro tutorials

Python

The Python tutorial will present the basic of the programming language itself. Therefore, no extra package apart of the Jupyter notebook will be required. However, we might have a preference for Python 3.6 over Python 2.7. The tutorial will be based on the SciPy lecture notes.

NumPy

NumPy forms the basis of the scientific ecosystem of Python by providing a new data type, the ndarray. This type allows to represent multi-dimensional homogeneous data as they appear in many scientific applications in the form of vectors and matrices or, for example, images. The use of NumPy arrays allows to significantly speed up numerical calculations in Python and, in addition, permits to write more succinct and readable code.

In this tutorial, we will discuss the basic concepts of ndarrays and, in particular, how they can be indexed to efficiently work with multi-dimensional data. We will learn how to manipulate ndarrays with NumPy and explore how typical numerical tasks can be solved either with NumPy or other packages from the Python scientific ecosystem like SciPy (which will be covered in more detail in a subsequent tutorial).

A basic knowledge of Python, at least on the level of the introductory tutorial on Python, is expected. Some familiarity with the slicing syntax of Python lists will be useful.

For the NumPy tutorial, it will be sufficient to have installed the packages mentioned on the top of this page.

Teaching material is available from Github, but some last-minute changes are likely. Make sure that you download the Jupyter notebook containing the exercises.

Git

Everybody developing code can profit from a version control system, no matter whether it is code written in Python or any other programming language or even a paper written, e.g., in LaTeX. A very popular version control system, particularly in the development of open source software, is Git which this tutorial will be devoted to. We will explore the basic workflow of code development with Git and also take a look at how code can be developed collaboratively with the help of Github.

While the example used to gain experience with the Git workflow will be based on Python code, a knowledge of Python is not strictly required for the purpose of this tutorial.

Apart from Python, which is only needed if you want to run the script used in the example, you will need the Git software to follow the Git workflow on your computer. See git-scm.com/downloads for binaries for Mac OS X and Windows as well as installation instructions for Linux and Solaris. There is no need to install a Git GUI as all examples will be demonstrated on the command line.

If you want to follow along the Github workflow at the end of the tutorial, you might want to sign up for Github at github.com. This will require you to choose a user name and a password and to provide your email address. Even if you do not sign up for Github, you will still be able to do most of the examples on your computer.

The tutorial (presently still under development) can be obtained from Github. You can get the LaTeX source and the images by downloading a zip file from Github or by cloning the repository once you have Git installed:

  git clone https://github.com/gertingold/euroscipy-git-tutorial.git

After the tutorial has been given, a PDF file of the presentation will be made available on Github.

Matplotlib

The basic packages listed on top of this page will be sufficient. We work along the SciPy lecture note but will develop or own notebooks.

Advanced tutorials

scikit-image

If you installed Anaconda or Canopy, you already have scikit-image installed. Otherwise, see http://scikit-image.org/docs/stable/install.html for installation instructions.

scikit-image version 0.12 or 0.13 is preferable.

Test code

    >>> from skimage import io, data
    >>> camera = data.camera()
    >>> io.imshow(camera)

Cython

To follow the Cython tutorial, please have Cython 0.25 or later (pip-)installed, in addition to the general packages listed above.

The Jupyter notebook(s) used in the tutorial will be made available at

http://kurs.behnel.de/espy2017/

SymPy

To follow the SymPy tutorial, please go to https://github.com/leosartaj/euroscipy-sympy-tutorial This link contains all the notebooks and instructions to install the required software. Additionally run python test_installation.py to check your installation. I will be updating the notebooks, so please pull the latest copy before the tutorial.

Scikit-learn

Please install the following packages (either with pip or conda):

  • scikit-learn 0.19.0 (along with numpy and scipy as dependencies)
  • pandas
  • matplotlib
  • jupyter

Check the scikit-learn version with:

python -c "import sklearn; print(sklearn.__version__)"

If you have an old version you can upgrade to scikit-learn 0.19.0 with conda update scikit-learn if you use conda or pip install -U scikit-learn otherwise.

We recommend using Python 3.6 but the tutorial material should also work with older Python versions (including Python 2.7, but please please consider using Python 3.6 instead).

In addition you can also install scikit-optimize (if you use a conda environment, you need to first conda install pip and then pip install scikit-optimize) in that environment. scikit-optimize has a dependency on scikit-garden which does not yet provide any binary package and can fail to install automatically from source on systems that lack a properly configured C/C++ compiler. If you have trouble installing scikit-garden and scikit-optimize, don't worry you will be able to follow that sections on the video projector while still being able to run the exercises of the other sections that only require scikit-learn.

The notebooks will be published on https://github.com/ogrisel/euroscipy_2017_sklearn (please update on Sunday evening or at the beginning of the tutorial assuming wifi is good enough).