Context: I am looking to upgrade to Ubuntu 20.04 LTS
I performed following steps:
$ sudo apt update
$ sudo apt upgrade -y
$ sudo reboot
$ sudo apt --purge autoremove
$ sudo apt install update-manager-core -y
$ sudo do-release-upgrade -dAnd this where I get the Py3 error message (in the subject)
I spent about 3 hours researching on what could be the problem. I also navigated to threads for the same question asked earlier but have not been able to figure out to fix the problem. I am hoping folks could help me here...
$ python --version
Python 2.7.17
$ python3 --version
Python 3.7.5
$ update-alternatives --list python3
/usr/bin/python3.6
/usr/bin/python3.7I checked the config, ofcourse nothing shows up for python, for python3 I have 3.6 and 3.7. I have selected 3.7 as default.
Using Ubuntu version below:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"And some more details:
$ ls -l /usr/bin/python3
lrwxrwxrwx 1 root root 25 Dec 15 23:08 /usr/bin/python3 -> /etc/alternatives/python3What more do I need to do fix the symlink problem?
23 Answers
I believe this is a know issue.
The suggested workaround is to remove the python’s binary in /usr/bin and then to create a symlink and perform the upgrade:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
sudo apt upgrade
do-release-upgradeLet me know how it goes.
1Solution:
I pointed python3.6 to python3Use Ubuntu pkgd python or python3 and not the upgraded versions!
Thanks all for the help. Sometimes you have to sweat all day to think of a small minor adjustment.
2Which operating system version do you use ?
The error means that the OS wants a link to an other python version.
Please post your /etc/issue
Try:
sudo apt-get install --reinstall python3