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
  • 197,895
  • 55
  • 485
  • 740
  • PPAs are 3rd party software sources (personal package archives) so all security & suitability checks are your responsibility ... the PPA doesn't provide support for groovy or 20.10, so you can't have performed the checks. – guiverc Apr 21 '21 at 05:23
  • A quick look at Ubuntu suppor for python3.6 (ie. rmadison python3.6) shows no support for it except in bionic. The language used by deadsnakes is inclusive of it's purposes ("new python versions") where you're after old python versions... – guiverc Apr 21 '21 at 05:26
  • What can you suggest? Go back to 20.04? – Glenn Karl Guiyab Apr 21 '21 at 05:29
  • last saturday I installed ubuntu 20.04 and it worked well. I might just go back to 20.04 if there is no workaround – Glenn Karl Guiyab Apr 21 '21 at 05:31

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
  • 62,253