7.1 Jupyter Notebooks
Overview
Jupyter Notebooks provide an interactive computing environment for data science, machine learning, and research. This guide covers installation and setup across different platforms.
What You’ll Learn
- Installing Jupyter via Conda or pip
- Running Jupyter on remote workspaces
- Accessing Jupyter through your browser
- Platform-specific considerations
Prerequisites
- A running workspace or VM with terminal access
- Python 3.8+ installed
- Network access configured (ports open for web access)
Installation Methods
Option 1: Using Conda (Recommended)
Conda provides the cleanest installation with dependency management.
Option 2: Using pip
Running Jupyter
Start the Server
Warning
The --ip=0.0.0.0 flag allows remote connections. Ensure your security groups/firewall only allow trusted IPs.
Access in Browser
After starting, Jupyter displays a URL with a token:
Replace 127.0.0.1 with your workspace’s IP address or hostname.
Platform-Specific Setup
Compute Service
Note
Compute Service workspaces may require security group updates to allow access on port 8888. See Managing Workspaces for instructions.
AWS (Direct Console)
Azure
Configuration
Set a Password (Recommended)
Instead of using tokens, set a password for easier access:
Jupyter Config File
Generate and customize the config:
Edit ~/.jupyter/jupyter_lab_config.py:
Running as a Service
To keep Jupyter running after disconnecting:
Using Screen
Using systemd (Linux)
Installing Kernels
Additional Python Environments
R Kernel
Troubleshooting
| Issue | Solution |
|---|---|
| Can’t connect to Jupyter | Check security group allows port 8888 from your IP |
| Token expired | Restart Jupyter or set a password |
| Kernel dies | Check memory usage; may need larger instance |
| Package not found | Ensure correct conda environment is activated |
Next Steps
- Anaconda/Conda - Full Conda setup guide
- VS Code Remote - Use VS Code with Jupyter extension