Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gneiss15 opened this issue Sep 5, 2024 · 0 comments

Comments

@gneiss15
Copy link

gneiss15 commented Sep 5, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant