Set up Python, Keras, and Jupyter

This page will show you how to set up your computer to follow along with the creative prediction examples.

All of our code examples are provided as Python 3 code in jupyter notebooks, you download these to your computer or alternatively open them directy in a browser-based Python environment.

Running examples on your computer (Python/Jupyter Setup)

Basically: you need a Python 3 environment with up-to-date versions of: keras, tensorflow, numpy, pandas, matplotlib, music21, jupyter, keras-mdn-layer

Annoyingly, there are two popular ways to set up Python on your computer: one installs python packages together in a special “environment” for each project you do, and the other sets up the packages for every project on your system.

Setup Miniconda to get the right Python

On Windows and confused? Try this page for help.

Install packages with Pip

Virtual Environments

Many people like to keep their Python libraries in separate “environments” for each project. If you do this, you can access each environment from Jupyter individually which is handy! Here’s how to for this.

Running examples in a browser (Google Colab)

Exercise: Try out a Google Colab Notebook

You can also run these notebooks on Google Colaboratory, a free-to-use Jupyter notebook environment that has most of the necessary Python libraries pre-installed. It even works on a tablet! If you want to get started quickly without slowing down to get your Python install right, Colab is a great way to go. The tutorials page has links ot open each example directory in Colab.

Colab has some amazing features:

There are some downsides though: