A guide on how to install Python 10 on WSL2 under Windows 10 / 11.
pyenv
is a tool that allows switching the global Python version, or choosing a specific version per project.
sudo apt update --yes
sudo apt install --yes build-essential curl git libbz2-dev liblzma-dev libffi-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libsqlite3-dev llvm make python3-openssl tk-dev wget xz-utils zlib1g-dev
curl https://pyenv.run | bash