14

I recently updated my Raspberry Pi with sudo apt update and sudo apt full-upgrade to the system. Even if Python 3.8 is out, when I run python3 in terminal, it shows me version 3.7, instead of 3.8.

Why is this the case?

Macintosh Fan
  • 368
  • 2
  • 3
  • 15

2 Answers2

28

Why? Just because it takes a while for distributions to integrate new versions.

Here's what I did to install Python 3.8.5 on my rpi:

sudo apt-get install -y build-essential tk-dev libncurses5-dev \
libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev \
libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev

version=3.8.5

wget https://www.python.org/ftp/python/$version/Python-$version.tgz

tar zxf Python-$version.tgz cd Python-$version ./configure --enable-optimizations make -j4 sudo make altinstall

Installs Python into /usr/local/bin

Waxrat
  • 556
  • 4
  • 2
1

This is worth sharing, someone made a bash script.

Ultimate Python installation on a Raspberry Pi & Ubuntu Script

This seems like an interesting site: https://itheo.tech/ultimate-python-installation-on-a-raspberry-pi-ubuntu-script

bbartling
  • 237
  • 2
  • 14