shlogg · Early preview
Super Kai (Kazuya Ito) @superkai_kazuya

Upgrade Ubuntu, Install Python 3.12-venv & PyTorch

Update Ubuntu, check Python version (e.g. `python3 --version`), install python3.x-venv & create virtual env (`python3 -m venv venv && . venv/bin/activate`). Install PyTorch with CUDA 11.8 and JupyterLab.

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...