I recently had to do a quick test of using python with ubuntu. I decided to use docker.
steps:
sudo docker run -it ubuntu bash
apt-get update
apt-get install python3-pip
# python3 --version
Python 3.8.5
to load up other stuff
sudo docker run -it -v $HOME:/work pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel bash
sudo docker run -it --ipc=host --rm -v $HOME:/work --privileged pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel bash
sudo docker run -it -v $HOME:/work py37_pytorch16_dte bash
sudo docker run -it -v $HOME:/work py37_trch16_trfmr43 bash