Install PyTorch and JupyterLab on Ubuntu

Buy Me a Coffee☕

First, update and upgrade Ubuntu:

sudo apt update && sudo apt -y upgrade

Next, check the Python version:

python3 –version
# Python 3.12.3

Next, install python3.12-venv:
*Memos:

For example, if the Python v…


This content originally appeared on DEV Community and was authored by Super Kai (Kazuya Ito)

Buy Me a Coffee

First, update and upgrade Ubuntu:

sudo apt update && sudo apt -y upgrade

Next, check the Python version:

python3 --version
# Python 3.12.3

Next, install python3.12-venv:
*Memos:

  • For example, if the Python version is Python 3.13.x, you need to install python3.13-venv.
  • By default, python3.xx-venv isn't installed on Ubuntu.
sudo apt install -y python3.12-venv

This is the current directory:

pwd
# /home/kai

Next, create a virtual environment:

python3 -m venv venv

Next, activate the virtual environment:

. venv/bin/activate

Next, install PyTorch with CUDA 11.8. *There are other CUDA(Compute Unified Device Architecture) versons and a ROCm(Radeon Open Compute Platform) version and CPU version available from here:

pip install torch torchvision torchaudio
\ --index-url https://download.pytorch.org/whl/cu118

Next, install JupyterLab:

pip install jupyterlab

Next, open JupyterLab on Firefox:

jupyter lab

*You can open JupyterLab with specific directory on Firefox:

jupyter lab --notebook-dir /home/kai

Image description


This content originally appeared on DEV Community and was authored by Super Kai (Kazuya Ito)


Print Share Comment Cite Upload Translate Updates
APA

Super Kai (Kazuya Ito) | Sciencx (2025-01-12T02:47:03+00:00) Install PyTorch and JupyterLab on Ubuntu. Retrieved from https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/

MLA
" » Install PyTorch and JupyterLab on Ubuntu." Super Kai (Kazuya Ito) | Sciencx - Sunday January 12, 2025, https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/
HARVARD
Super Kai (Kazuya Ito) | Sciencx Sunday January 12, 2025 » Install PyTorch and JupyterLab on Ubuntu., viewed ,<https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/>
VANCOUVER
Super Kai (Kazuya Ito) | Sciencx - » Install PyTorch and JupyterLab on Ubuntu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/
CHICAGO
" » Install PyTorch and JupyterLab on Ubuntu." Super Kai (Kazuya Ito) | Sciencx - Accessed . https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/
IEEE
" » Install PyTorch and JupyterLab on Ubuntu." Super Kai (Kazuya Ito) | Sciencx [Online]. Available: https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/. [Accessed: ]
rf:citation
» Install PyTorch and JupyterLab on Ubuntu | Super Kai (Kazuya Ito) | Sciencx | https://www.scien.cx/2025/01/12/install-pytorch-and-jupyterlab-on-ubuntu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.