FMP AudioLabs
B

Get Started


This notebook gives a short introduction on how to start interacting with the FMP notebooks.

If a static view of the FMP notebooks is enough for you, the exported HTML versions can be used right away without any installation. All material including the explanations, the figures, and the audio examples can be accessed by just following the HTML links. If you want to execute the Python code cells, you have to download the notebooks (along with the data), create an environment, and start a Jupyter server. You then need to follow the IPYNB links within the Jupyter session. In the following, we explain the following four steps in detail:

  • Downloading the FMP notebooks as well as the data
  • Installing Miniconda
  • Creating a conda environment
  • Starting the Jupyter server

Further information can also be found in the FMP notebook on installing Python packages and using environment files.

Downloading the FMP Notebooks

The FMP notebooks along with all data are contained in a single zip-compressed archive. You can find this archive at

Decompress the archive and store it on your local computer.

Installing Miniconda

Conda is an open source package manager that helps finding and installing packages. It runs on Windows, macOS and Linux. The Conda package and environment manager is included in Anaconda and its slim version Miniconda, which are free and open-source distributions of Python. Miniconda can make installing Python quick and easy even for new users. Download and install Miniconda for your platform from the following website:

Creating the Conda Environment

We provide an environment file with all packages needed for interacting with the FMP notebooks. Open the Anaconda Prompt on Windows or your default shell on Linux/macOS. Then change to the directory that contains the file environment.yml. Create the environment with the following command:

conda env create -f environment.yml

Starting a Jupyter Server

After creating the FMP environment, you need to activate the environment using the following command:

conda activate FMP

Finally, one needs to change to the directory containing the FMP notebooks and to start the Jupyter server by using the following command:

jupyter notebook

This should open a browser, displaying the folder structure of the FMP notebooks. You then can open the overview notebook by selecting the file C0/C0.ipynb. You can also directly open any FMP notebook by selecting a file in any subdirectory with the file extension .ipynb. Within the Jupyter session you need to follow the IPYNB links to keep the code cells executable. Furthermore note that, within the Jupyter session, you can only access files that are contained in the directory you used for launching the Jupyter server or in any subdirectory.

Further Useful Commands

Here is a list of useful commands, which may be helpful when updating and starting the environment. The command will be explained in more detail in subsequent notebooks.

Updating, removing, and creating Python environments:
conda update conda
conda env update -f environment.yml
conda env remove -n FMP
conda env create -f environment.yml

Install package to strip output from IPython notebooks:
conda activate FMP
nbstripout --install

Install spell checker:
jupyter notebook
jupyter contrib nbextension install --user
jupyter nbextension enable spellchecker/main

Export Notebooks as HTML using classical style:
jupyter nbconvert --to html --template classic B_GetStarted.ipynb

Configure notebook to disable cross-site-request-forgery protection:
jupyter notebook --NotebookApp.disable_check_xsrf=True
Acknowledgment: This notebook was created by Frank Zalkow and Meinard Müller.
C0 C1 C2 C3 C4 C5 C6 C7 C8