How to fix Ubuntu /usr/bin/env: ‘python’: No such file or directory

This post is also available in: Deutsch (German)

In recent Ubuntu versions, you can encounter the error message

/usr/bin/env: 'python': No such file or directory

for some scripts that want to be executed using python where only python3 is available (python2 has long been deprecated).

In order to fix the issue, install the python-is-python3 package which makes python and alias of python3:

sudo apt -y install python-is-python3