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

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

EDIT: hi everyone, I noticed that @mchid posted a better solution below my answer: sudo apt install python-is-python3.

Leave a Comment