擅长:python、mysql、java
<p>我也面临同样的问题。在</p>
<p><strong>问题:</strong>
在Windows环境中创建python文件时,新行字符是<strong>CRLF</strong>。
我的hadoop运行在Linux上,它将换行符理解为<strong>LF</strong></p>
<p><a href="https://i.stack.imgur.com/LISBw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LISBw.png" alt="enter image description here"/></a></p>
<p><strong>解决方案:</strong>
将<strong>CRLF</strong>更改为<strong>LF</strong>后,步骤成功运行。在</p>
<p><a href="https://i.stack.imgur.com/z4XhU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/z4XhU.png" alt="enter image description here"/></a></p>