When upgrading python3-twisted (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)