Home‎ > ‎

PyCon 2015

Montreal, Canada
Thursday 9 April, 1:20 pm–4:40 pm


Slides


Video


Installation instructions

Note: Although the wireless network held up admirably last year, we should not count on it.  Please try to install everything you need for this tutorial before you leave home!

Code for this tutorial is in a Git repository on Github.  If you have a Git client installed, you should be able to download it by running:

git clone https://github.com/AllenDowney/CompStats.git

It should create a directory named CompStats.  Otherwise you can download the repository in this zip file.

To do the exercises, you need Python 2.x with IPython, NumPy, SciPy, and matplotlib.  My code should also work with Python 3, but has not been tested as extensively.

I highly recommend installing Anaconda.  By default it contains everything you need for the workshop, it is easy to install on Windows, Mac, and Linux, and because it does a user-level install, it will not interfere with other Python installations.

To test your environment, start IPython:

cd CompStats
ipython notebook

A browser window should appear with a list of files in this directory, like this:

If you have a more recent installation, it might say Jupyter at the top instead of IPython.  Either one is fine!

if IPython didn't create a browser window for you, you can do it yourself.  When you started the notebook, you should have seen a message like this:

2015-04-02 15:44:33.254 [NotebookApp] Using existing profile dir: u'/home/downey/.ipython/profile_default'
2015-04-02 15:44:33.267 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/MathJax.js
2015-04-02 15:44:33.280 [NotebookApp] Serving notebooks from local directory: /home/downey/thinkstats/trunk/CompStats
2015-04-02 15:44:33.280 [NotebookApp] 0 active kernels 
2015-04-02 15:44:33.280 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2015-04-02 15:44:33.280 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

This is the startup message from the IPython server.  The important part is highlighted: it provides the URL you can use to connect to the server.  Launch a browser and paste in this URL.

Click on effect_size.ipynb, which is the first of the three notebooks we'll use in the tutorial.  It should open and look like this:

Execute the first few cells by pressing Shift-Enter a few times, or from the Cell menu select "Run All".

If you don't get any error messages, you have everything you need.  Otherwise the error message should indicate what you are missing.

If you have any problems, please let me know before the tutorial.  We will not have time on the day of the tutorial to debug problems with your environment.

However, if you are not able to get your environment set up ahead of time, please come to the tutorial anyway.  At the beginning of the tutorial I will pair up participants to work together.  As long as each pair has a working environment, we will be all set.


Slides




Comments