1

I tried this one from google

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

But the problem is in add-apt-repository it shows

  • Note: Python2.7 (all), Python 3.5 (xenial), Python 3.6 (bionic), Python 3.8 (focal) are not provided by deadsnakes as upstream ubuntu provides those packages.

And while installing it shows error

Err:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu groovy Release 404  Not Found [IP: 91.189.95.85 80]

And when I try the sudo apt install python3.6. It shows the following error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by glob 'python3.6'

How can I install from upstream ubuntu?

I had no problem installing python 3.6 on ubuntu 20.04 last time.

muru
  • 207,228

1 Answers1

-1

You can install any version of Python on any release of Ubuntu that you wish...as long as you don't try to force your Ubuntu system into using packages that it's not designed for.

  1. REQUIRED: Don't uninstall the (deb) python that came with Ubuntu. The system needs it. If you remove it, you will break your system horribly.

  2. ADVICE: Avoid using deb packages for your custom python if those packages conflict with the system python. Don't force it -- there are lots of non-deb install options for your custom python.

    In your case, that means installing your unusual Python from a non-deb source (like upstream python.org) instead of looking for deb packages that simply aren't there for your release of Ubuntu.

  3. ADVICE: When possible, use a Virtual Environment (venv) to keep everything tidy.

  4. OPTIONAL: Keep track of what you install. If you installed it, you are likely to want to change it or upgrade it someday.

user535733
  • 68,493