4

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.

13
  • 1
    This question belongs on askubuntu Commented Feb 12, 2022 at 3:31
  • Considering this very similar question on here I assumed it was fine Commented Feb 12, 2022 at 3:32
  • Installing tools needed for software development is ... borderline on-topic for StackOverflow. But I agree it would be better to ask it on AskUbuntu, because it is very Ubuntu specific. Commented Feb 12, 2022 at 3:41
  • Considering I literally said I followed those same instructions to no avail, erm, no, I do need to ask this question, otherwise I wouldn't be here. Assuming I can't migrate my own question I'll copy-paste it over there. Commented Feb 12, 2022 at 3:43
  • Well ... the answer for that question is the same as for your question. So you probably didn't need to ask this one anyway. (Just install python3.8-dev from "deadsnakes" instead of python3.6-dev) In the unlikely (!!) event that whose instructions don't work, you should add details of what you actually did to your question ... so that someone can help you figure it out. Commented Feb 12, 2022 at 3:48

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

7 Comments

I figured this out eventually. Just a bit of a shame the old versions weren't left public as there was a working 3.8 version for Xenial for a time, I think.
Hi @Aleks is there a .deb package that has the same effect as "sudo apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv " ? i.e. it includes the dev, disutils and venv packages ?
In my case it was built according to official release source from python. You can adjust sources and modules during your build development @fatbringer
hi -- deadsnakes here -- I have limited space on the PPA, and I can't update packages after ubuntu has marked them end-of-life. so unfortunately I delete them so I can support newer python versions and newer OS releases (and eliminate the "can I have the latest patch version for (eol'd version) kthx" drive by issues)
@TommyGibbons By "figured this out" I mean I figured out that the deadsnakes ppa was decommissioned for end-of-life Ubuntu versions, not that I figured a solution. The solution really was to just update Ubuntu!
|
0

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.

Comments

-1

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)"

3 Comments

ah but we cant make the python 3.8 venv without having installed the package. right now we cant even install the package !
PYENV, not venv :). Pyenv is a version manager that allows you to install a desired version.
What is pyenv supposed achieve or allow? Why pyenv? What is the theory of operation? Can you elaborate a bit (it doesn't have to be along)? (But *** *** *** *** *** without *** *** *** *** *** "Edit:", "Update:", or similar - the answer should appear as if it was written today.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.