Created
February 20, 2022 12:33
-
-
Save ant1fact/8fdacea1b925ec9219cb04467783b18c to your computer and use it in GitHub Desktop.
Install python3.10 as python on ubuntu 20.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:deadsnakes/ppa -y | |
# Python 3.10 | |
sudo apt install python3.10 | |
sudo apt install python3.10-dev | |
sudo apt install python3.10-distutils | |
sudo apt install python3.10-venv | |
# Pip | |
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 | |
echo 'export PATH=/home/<USER>/.local/bin:$PATH' >>~/.profile | |
source ~/.profile | |
pip install --upgrade pip | |
# Remap | |
sudo apt install python-is-python3 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 |
# Setup
sudo apt update && sudo apt upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
# Python 3.11
sudo apt install python3.11
sudo apt install python3.11-dev
sudo apt install python3.11-distutils
sudo apt install python3.11-venv
# Pip
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
echo 'export PATH=/home/${USER}/.local/bin:$PATH' >> ~/.profile
source ~/.profile
pip install --upgrade pip
# Remap
sudo apt install python-is-python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
Updated for Python 3.11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: I used these commands in a clean Ubuntu 20.04 installation running on WSL2