/usr/bin/env python no such file or directory ubuntu

Which made little sense to me. My problem is that my editor had silently converted the script from Unix LF to Windows CR/LF line-termination. A rather unfortunate upshot of this is that “#!/usr/bin/env python” actually became “#!/usr/bin/env python\015” where \015 is the invisible CR character… /usr/bin/env was, then, unable to find a command “python\015” – hence the file-not-found error.

sudo apt-get install tofrodos

Leave a Reply

Your email address will not be published. Required fields are marked *