/usr/bin/env python no such file or Directory:dos format caused by!

Source: Internet
Author: User
Tags ftp transfer

Several python files have recently been modified and found to be executed only with Python file on Linux, directly./file the error "No such file or directory", and the script starts with "#!/usr/bin/env python",   Should be straightforward to execute. In general, this error is caused by no permissions. However, this script has execute permission. Google found that the original is the format of the problem! A few times before I put the file ftp to the Windows editor, it is estimated that the button is not small dot conversion format ... Cheap hands. http://www.gossamer-threads.com/lists/python/python/77314
/usr/bin/env:python:no such file or directory [Inreplyto]
> 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's 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 trips up the shell or
The env command, since it'll be trying to run the program python^m.

Hamish Lawson

pasted from: >  


From Wiznote

/usr/bin/env python no such file or Directory:dos format caused by!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.