/usr/bin/env: ‘python’: No such file or directory

For ubuntu 20.04 you can use following package to python command. And it is python 3.

sudo apt-get install python-is-python3


I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.

I tried:

sudo apt-get install python2.7-minimal

but I still got the same error. I solved it by:

sudo apt install python-minimal

Problem scenario:

/usr/bin/env: ‘python’: No such file or directory

Possible Solution #1

If Python 3 is not installed, install it: apt-get install python3

Possible Solution #2

If Python 3 has been installed, run these commands: whereis python3

Then we create a symlink to it: sudo ln -s /usr/bin/python3 /usr/bin/python