Python 3.7 on Ubuntu 20.04 - Stack Overflow
Help with installing python 3.7
I need to use python 3.7 but Ubuntu 20.4 comes with 3.8 pre-installed - can I install it with apt-get alongside 3.8?
Installing specific python version in Ubuntu 20
Videos
For newer Python I prefer the deadsnake ppa. For installing it, try this:
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7
$ python3.7 -V
Python 3.7.7
The Python 3.7 package from the official Ubuntu 19.10 repositories can be installed in Ubuntu 20.04 without adding any new repositories to your software sources by running the following commands:
sudo apt update
wget -c http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-9_amd64.deb http://security.ubuntu.com/ubuntu/pool/main/p/python3.7/libpython3.7-stdlib_3.7.5-2~19.10ubuntu1_amd64.deb http://security.ubuntu.com/ubuntu/pool/main/p/python3.7/libpython3.7-minimal_3.7.5-2~19.10ubuntu1_amd64.deb http://security.ubuntu.com/ubuntu/pool/main/p/python3.7/python3.7-minimal_3.7.5-2~19.10ubuntu1_amd64.deb http://security.ubuntu.com/ubuntu/pool/main/p/python3.7/python3.7_3.7.5-2~19.10ubuntu1_amd64.deb
sudo apt install ./libffi6_3.2.1-9_amd64.deb ./libpython3.7-minimal_3.7.5-2~19.10ubuntu1_amd64.deb ./libpython3.7-stdlib_3.7.5-2~19.10ubuntu1_amd64.deb ./python3.7-minimal_3.7.5-2~19.10ubuntu1_amd64.deb ./python3.7_3.7.5-2~19.10ubuntu1_amd64.deb
Add Python 3.7 to update-alternatives so that you can switch between Python 3.8 and Python 3.7 by running update-alternatives --config python3.
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7
update-alternatives --config python3
Do you need Ubuntu 20.04? Ubuntu 18.04 comes with Python 3.6, and 3.7 available.
If you do, the deadsnakes PPA has Python 3.5-3.7 for Ubuntu 20.04 (Focal). To add it and install:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.7
P.s. I'm not a dev and have no experience with Tensorflow so take this with a grain of salt.
(Sidenote: add-apt-repository runs apt-get update automatically, but that's not documented in man add-apt-repository, only add-apt-repository --help. This was fixed in a later release.)
Tensorflow 2.2 now supports python 3.8 so problem is solved now.
I am on a raspberry pi if that makes a difference. I’d like to install python 3.7 ideally so my projects can work. I’ve googled it and sudo apt-get install python3.7 doesn’t work and I see some other meathods but it involves installing other things and I’m not exactly sure what those things are or do