Krzysztof Onak > Teaching > Programming for Data Science (DS-210, Spring 2022) > Running the lecture notebooks

Running the lecture notebooks on your computer (DS-210, Spring 2022)

The classroom presentations in DS-210 use RISE, a package for turning Jupyter notebooks into slideshows. If you are taking this class, you do not have to know how to run RISE on your machine. However, if you are interested in doing so, you can find instructions how to install necessary tools on Fedora below. You should adjust the instructions to your operating system and package manager (e.g., conda can be more useful than pip). The resolution the presentations were optimized for is 1920x1080 and they should require no scrolling in this or higher resolutions.

Note: At the time of writing, RISE only works with Jupyter Notebook so using JupyterLabs, its more modern replacement, is not an option.

Warning: These installation instructions should work on Fedora. You have to adjust them to your working environment. Use them at your own risk.

First part of the course: Python

Run the following commands as a regular user on Fedora. They should install both Jupyter Notebook and RISE. Additionally, they should enable all extensions that are used for presentations.

pip install notebook
pip install rise
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable splitcell/splitcell --user
jupyter nbextension enable spellchecker/main --user
jupyter nbextension enable rise/main --user

The following commands install all data science Python packages used in the first part of the course.

pip install numpy
pip install pandas
pip install matplotlib
pip install scikit-learn
pip install Pillow
pip install pdoc3

Second part of the course: Rust

If you are taking this class, you do not have to know how to run a Rust kernel in Jupyter Notebook. In fact, you are supposed to write all your code in text files (extension .rs) and preferably use the cargo package manager to compile and run your code. The goal of these instructions is to help you if you want to run the interactive notebooks that are used for presentations.

First, install Rust. See the online instructions how to do this. On Linux, including Fedora, this should work:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Alternately, you can use use your package manager if it provides Rust. On Fedora, run the following command, which installs also additional tools used in class:

sudo dnf install rust cargo rustfmt rust-doc

Now to install EVCXR—an interactive environment for Rust—with Jupyter notebook integration, the following commands should work Fedora. The first one installs required tools for compiling EVCXR.

sudo dnf install cmake gcc-c++
cargo install evcxr_jupyter
evcxr_jupyter --install