Install Jupyter on Ubuntu 23.04
1. Install Python and pip
sudo apt install -y python3 python3-pip
2. Upgrade pip to the latest version
python3 -m pip install --user --upgrade pip
3. Install Jupyter
pip3 install jupyter
4. Test whether the installation is successful
jupyter notebook
# or
jupyter notebook --allow-root
If Jupyter is running normally, open the browser and display the Jupyter interface, then the installation is successful.
5. (Optional) Install the Jupyter kernel and extensions
If you want a conda kernel, run in your conda environment,
conda install ipykernel
python -m ipykernel install --user --name myenv --display-name "conda-env"
If you need other kernels (R, Julia, etc.) or extensions (jupyterlab, widgets, etc.), please install them according to the project documentation.
6. (Optional) Configure Jupyter, set passwords, etc.
jupyter notebook --generate-config
This generates a configuration file ~/.jupyter/jupyter_notebook_config.py
. You can configure in this file, such as setting a password,
c.NotebookApp.password = u'sha1:...'
sha1:...
is the SHA1 hash of your password, which can be python3 -m notebook password
generated .
The above steps can complete the installation of Jupyter and the required kernel and extensions on Ubuntu 23.04.
Jupyter is an awesome tool that allows you to easily create and share documents, execute code, and more.
end!