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

Hamish Lawson hamish_lawson at yahoo.co.uk
Mon Dec 17 00:42:55 CET 2001


> When trying to run a script, I get the following message:
> 
> /usr/bin/env: python: No such file or directory

Though perhaps not the case here, I'll just mention a problem that is
worth being aware of when transferring a script from a Windows/DOS
system to Unix. If the difference in line-ending conventions hasn't
been taken care of (such as by using ASCII mode during FTP transfer),
then the spurious ^M in the script's #! line can trip up the shell or
the env command, since it will be trying to run the program python^M.

Hamish Lawson



More information about the Python-list mailing list