On many Linux systems, /usr/bin/python is traditionally Python 2.x, while Python 3.x is /usr/bin/python3.
On Debian 11, Python 2.x is now optional. So #!/usr/bin/env python may not work even though there is a working Python (3.x) interpreter installed. I would expect that to be also the case on new (non-LTS) Ubuntu and maybe Fedora systems.
The simple fix is to change the hashbang line to #!/usr/bin/env python3. That would break on systems which only have Python 2.x installed. Are those still a concern?
On many Linux systems, /usr/bin/python is traditionally Python 2.x, while Python 3.x is /usr/bin/python3.
On Debian 11, Python 2.x is now optional. So
#!/usr/bin/env python
may not work even though there is a working Python (3.x) interpreter installed. I would expect that to be also the case on new (non-LTS) Ubuntu and maybe Fedora systems.The simple fix is to change the hashbang line to
#!/usr/bin/env python3
. That would break on systems which only have Python 2.x installed. Are those still a concern?