Public bug reported:

When upgrading python3-twisted (on ubuntu 18.04) I got the error:
ValueError: the symlink /usr/bin/python3 does not point to the python3 default 
version. It must be reset to point to python3.6

This is because I had installed alternatives to python3.6.
When doing this the symlink '/usr/bin/python3' points to 
'/etc/alternatives/python3' which in turn points to '/usr/bin/python3.6'.

So the code of the function 'default_version' is (at least) incomplete.

My sugestion:
Insert the following code before the comment '# consistency check' (Line 146):

while os.path.islink(_default_version):
    _default_version = os.readlink(_default_version)

I had atached the modified file. The upgrade of python3-twisted was
successful after using it.

Remark:
I am not shure what package is the right one. I found out (via dpkg -S) that 
the py3versions.py file belongs to the python3-minimal package, but if you 
search for python3-minimal here in Launchpad, it points to python3-defaults.


Here are the requested system informations:
> lsb_release -rd: Ubuntu 18.04.6 LTS
> apt-cache policy python3-minimal: 3.6.7-1~18.04

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2080834

Title:
  function default_version in py3versions.py fails if
  os.readlink('/usr/bin/python3') returns a link

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2080834/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to