Skip to content

./x.py build fails on Debian testing (Bullseye) due to missing /usr/bin/python #84306

Closed
@liuw

Description

@liuw

Debian has removed /usr/bin/python due to deprecation of Python2. To quote https://wiki.debian.org/Python:

NOTE: Debian testing (bullseye) has removed the "python" package and the '/usr/bin/python' symlink
due to the deprecation of Python 2. No packaged scripts should depend on the existence of '/usr/bin/python': if they do,
that is a bug that should be reported to Debian. You can use the 'python-is-python3' or 'python-is-python2'
packages to restore an appropriate '/usr/bin/python' symlink for third-party or legacy scripts.

I tried this code:

./x.py build

I expected to see this happen: Build successfully executed.

Instead, this happened: /usr/bin/python cannot be found.

This can be solved by installing either python-is-python2 or python-is-python3 as suggested by the Debian wiki page.

There are other scripts in tree which use #!/usr/bin/env python. I think it would be good to either fix these scripts to explicitly use a version of Python or document Debian's behaviour somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions