0

Recently I upgraded from Ubuntu 22.04 to Ubuntu 23. After the upgrade, I noticed that the default python3 was also upgraded to python3.11. I tried to install an older version of python through apt, but I kept getting

E: Package 'python3.10' has no installation candidate

I tried to solve it by changing the name of the PPA repositories to the new version in the sources.list file

❯ sudo sed -i ‘s/jammy/lunar/g’ /etc/apt/sources.list

After the above command all the repos were unchecked from the "Software & Updates" app/settings.

Software & Updates -> Other Software

If I manually enable the deadsnake one (the one that should have python packaged), I'll get the following:

Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/deadsnakes/nightly/ubuntu lunar Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I feel like I messed this up quite bad.. Could anyone help me figure it out?

Thanks.

EDIT: I ended up build ing python3.8 from source. Looks like the repository that I used previously doesn't support the new Ubuntu 23.04.

Szeka
  • 1
  • Install anaconda and set up a virtual environment for python3.10 https://anaconda.org/anaconda/python – Archisman Panigrahi Apr 23 '23 at 18:44
  • Changing the python interpreter can be a system killer. You may need to reinstall the OS. Don't change the python interpreter on your system. Use virtual environments instead. – Nmath Apr 23 '23 at 19:21
  • @ArchismanPanigrahi yea, the project I'm working on requires a separate virtualenv for pip – Szeka Apr 24 '23 at 09:23
  • @Nmath right, though the python interpreter got during the system upgrade to ubuntu 23.04. – Szeka Apr 24 '23 at 09:24
  • @guiverc Thanks, I think it does. Yesterday I was able to build python3.8 from source. I had the assumption that the PPA repositories always support the new releases, but it's totally up on the maintainers. – Szeka Apr 24 '23 at 09:25

0 Answers0