Before we begin: installing Python and Jupyter#

We expect that you are reading this online. The HTML your browser is rendering was produced by a program called Jupyter Book (which you don’t need to install, but you can if you want to write your own book). It is built from “Jupyter notebooks” that we wrote, which were connected to a Python 3 “kernel.” We want you to install some version of Python and Jupyter notebooks. One easy way to do that is to go to the Anaconda website. Follow the download instructions for your particular machine to get the Anaconda distribution. This includes Jupyter notebooks. After you have done that, you will be able to launch Jupyter notebooks and run them. This OER is intended to be for active learning: we want you to experiment, not just read.

Warning: Jupyter notebooks, which have an “.ipynb” file extension, can’t be “double clicked” to launch Jupyter Notebook. You have to start Jupyter Notebook first, say by the command jupyter notebook in an Anaconda prompt on a Windows machine then navigate (yes, this means you have to learn the file directory system) to where the notebook is, and open it from within the program. This seems a bit old-fashioned, but it’s just the way things are, and you will get used to it. On Unix any ordinary terminal will work; this includes Macs, of course. Details are available at the Anaconda website.

All of our Jupyter notebooks, which we told Jupyter Book to use to create this OER, are available to you: just click the download button near the top right. Alternatively you can go to the GitHub repository. This will give you all our code to experiment with (we have made it available using the MIT license, which, loosely speaking, means you have permission to use it for practically anything, but the code comes with no guarantees and so if something goes wrong with your usage, it’s not our fault).

Managing packages#

The later units, especially Chaos Game Representation, need some special “packages” such as scikit-learn which must be separately installed. Managing this process is relatively straightforward but requires some care. The file requirements.txt in the GitHub Repository has a list of all the packages that are needed. To install all the packages at once, in your terminal run conda install -c conda-forge --file requirements.txt.