References:
Vultr
How to Install Jupyter Notebook on Ubuntu 24.04
https://docs.vultr.com/how-to-install-jupyter-notebook-on-ubuntu-24-04
Prerequisites
- Ubuntu 24.04
- Internet access
Install Jupyter Notebook with pip
- Update the APT package index:
sudo apt update - Install the virtualenv package:
sudo apt install python3-virtualenv -y - Create a virtual environment:
virtualenv jupyter_env - Activate the virtual environment:
source jupyter_env/bin/activate - Install Jupyter Notebook:
pip install jupyter - Verify the installed version:
jupyter-notebook --version
You can deactivate the virtual environment at any time by running deactivate.
If u need more gudelines please visit Vultr
Modify the configuration
# Edit the configuration file
vim ~/.jupyter_notebook_config.py
c.ServerApp.open_browser = False
c.ServerApp.allow_remote_access = True
# Set a password
jupyter notebook password
cat ~/.jupyter_server_config.json
vim ~/.jupyter_notebook_config.py
c.ServerApp.password = '___your password hash___'
# Create a startup script
#!/bin/bash
source __yourenvname__/bin/activate
CURRENT_IP=$(hostname -I | awk '{print $1}')
echo "IP Address: $CURRENT_IP"
jupyter notebook --no-browser --port 8888 --ip="$CURRENT_IP"