ch4rl1e97
ch4rl1e97

Reputation: 686

Why can't I install python3.8-dev on Ubuntu 16.04?

This comes as a wider issue of Flask with Apache 2.4 throwing a hissy fit over which version of Python they want to use, but I can't follow any of the guidance I've found to fix it, because I need python3.8-dev and it doesn't want to install:

apt install python3.8-dev
...
E: Unable to locate package python3.8-dev
E: Couldn't find any package by glob 'python3.8-dev'
E: Couldn't find any package by regex 'python3.8-dev'

I have already done:

add-apt-repository ppa:deadsnakes/ppa
apt install software-properties-common
apt update
apt upgrade

which all succeed. However, none have so far led to success with installing python3.8-dev.

The output of lsb_release -a is Ubuntu 16.04 (Xenial Xerus):

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial

I feel like I'm going mad. Everything worked fine and today it just didn't. I do of course already have Python 3.8 installed.

Upvotes: 4

Views: 24303

Answers (3)

m_r_nadh
m_r_nadh

Reputation: 11

Looks like deadsnakes repo no longer offers python3.8. This is what I see when I try to add the repo in Ubuntu 16.04

Supported Ubuntu and Python Versions

  • Ubuntu 20.04 (focal) Python3.5 - Python3.7, Python3.9 - Python3.11
  • Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11
  • Note: Python2.7 (all), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages.

Upvotes: 0

Aleks
Aleks

Reputation: 31

ppa:deadsnakes was decommissioned for Ubuntu 16.04 (Xenial Xerus). Try to build a custom .deb package.

Upvotes: 3

itsk
itsk

Reputation: 9

The easiest way right now is to use pyenv. Here's a good guide:

How to Install Pyenv on Ubuntu 18.04

If the 'pyenv global' command doesn't change the default version, run the following:

eval "$(pyenv init --path)"

Upvotes: -1

Related Questions