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

In recent Ubuntu versions, you can encounter the error message

python_missing_error.txt
/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:

install_python_is_python3.sh
sudo apt -y install python-is-python3

 


Check out similar posts by category: Linux