Using Jupyter Notebooks

Jupyter is a web application that lets you create interactive/sharable code on multiple languages including Python [http://jupyter.org/]

  • Jupyter is already installed in the TP room computers. You can find it in:
    Menu>Dévelopment>Ipython Notebook (Anaconda)
    The default python version is 2.x which is what we need
  • We need to install the ipython-sql extension. In a terminal window run the following command:
  • $ pip install --user --upgrade ipython-sql
    
  • Now you can start Jupyter, it may take some time until it loads the content of the local folder.
    If it does not:
    1) Click on the home logo inside Jupyter (the blue house icon) and wait
    2) If nothing loads after 1 min, close Jupyter and the related terminal window (Ctrl+c twice) and try again
  • Once the content of the local folder is loaded you can navigate to the folder where the notebook file (.ipynb) is located.
    — Double click on the notebook file to open it.
    — The notebook should work without issues now

If you want to work in your personal computer you will need:

  • Python (2.x)
  • Jupyter
  • ipython-sql extension

Anaconda is the easiest way to get a working python environment (Linux, MacOS, and Windows).
[https://www.continuum.io/downloads]
Miniconda is a minimalistic version of anaconda which contains only conda and Python. Extra packages have to be installed manually.
[https://conda.io/miniconda.html]

Note 1: If you are using Windows:
pip requires a compiler sometimes [https://wiki.python.org/moin/WindowsCompilers].
To install the ipython-sql extension:
1) Download the project from https://github.com/catherinedevlin/ipython-sql
2) In the command prompt:

$ cd ipython-sql
$ sudo python setup.py install

Note 2: The notebook works on Python 2.x but not on Python 3.x, although the fix is trivial we won’t provide support for it.