Timothy Clotworthy
Timothy Clotworthy

Reputation: 2482

Updating from Python 3.5.2 to Python 3.8 using deadsnakes PPA is not working on Ubuntu 16.04 LTS

I can't update Python on Ubuntu 16.04 LTS from my Python 3.5.2 to 3.8. I found an existing post here which shows how to update Python to 3.8. I tried those steps are follows:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8

However, after the third step, I get this error:

enter image description here

Upvotes: 3

Views: 14918

Answers (2)

itsafire
itsafire

Reputation: 6093

The deadsnakes repo is no longer available for Ubuntu 16.04. You have to build python yourself. Please check my answer for installing any python version using pyenv on Ubuntu 16.04.

Upvotes: 5

Timothy Clotworthy
Timothy Clotworthy

Reputation: 2482

My ubuntu did not have the latest pre-built packages so I had to install from source according to the following guide: here.

sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar -xf Python-3.8.0.tgz
cd Python-3.8.0
./configure --enable-optimizations
make -j 8
sudo make altinstall

Upvotes: 20

Related Questions