Environment:Fastai Fastbook Jupyter Notebook Environment
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Development |
| Last Updated | 2026-02-09 17:00 GMT |
Overview
Jupyter Notebook environment required for interactive execution of all Fastbook chapters, with `nbdev` and `ipywidgets` for notebook tooling.
Description
All Fastbook content is authored as Jupyter notebooks (`.ipynb` files). The environment requires Jupyter Notebook or JupyterLab for interactive execution. The `nbdev` library (>= 0.2.12) provides documentation display via `show_doc`, and `ipywidgets` enables interactive UI elements such as image upload widgets for the production deployment chapter. Cloud platforms (Colab, Kaggle, Paperspace, AWS SageMaker) provide pre-configured Jupyter environments.
Usage
Use this environment for all Fastbook workflows. Every chapter is a Jupyter notebook that combines code cells, markdown explanations, and inline visualizations. The interactive nature is essential for:
- Data exploration: Viewing images, DataFrames, and model outputs inline
- Training monitoring: Progress bars and loss plots during training
- Widget-based deployment: Upload widgets for model inference demos (Ch2)
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Any (Linux, macOS, Windows) | Cloud platforms also supported |
| Browser | Modern web browser | For Jupyter web interface |
| Python | >= 3.6 | Same as core environment |
Dependencies
Python Packages
- `jupyter` or `jupyterlab`
- `nbdev` >= 0.2.12 (for `show_doc` display)
- `ipywidgets` (for interactive widgets)
- `matplotlib` (for inline plotting)
Credentials
No credentials required for Jupyter itself.
Quick Install
pip install jupyter ipywidgets nbdev>=0.2.12 matplotlib
# Or install JupyterLab
pip install jupyterlab ipywidgets nbdev>=0.2.12 matplotlib
# Launch
jupyter notebook
Code Evidence
Widget and display imports from `utils.py:3-4`:
from nbdev.showdoc import *
from ipywidgets import widgets
Matplotlib configuration from `utils.py:10-12`:
mpl.rcParams['savefig.dpi']= 200
mpl.rcParams['font.size']=12
Display width settings from `utils.py:17-19`:
pd.set_option('display.max_columns',999)
np.set_printoptions(linewidth=200)
torch.set_printoptions(linewidth=200)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Widget Javascript not detected` | ipywidgets not properly installed | `jupyter nbextension enable --py widgetsnbextension` |
| `ModuleNotFoundError: No module named 'nbdev'` | nbdev not installed | `pip install nbdev>=0.2.12` |
| Plots not displaying inline | matplotlib backend not set | Add `%matplotlib inline` at top of notebook |
Compatibility Notes
- Cloud platforms: Google Colab, Kaggle Notebooks, and Paperspace Gradient come with Jupyter pre-installed. Only `fastai` and specific dependencies need to be installed.
- JupyterLab: Works with both classic Jupyter Notebook and JupyterLab. Some widget features may require `jupyter labextension install @jupyter-widgets/jupyterlab-manager`.
- VS Code: Jupyter notebooks can also be run in VS Code with the Jupyter extension.