env: python3\r: No such file or directory 2019-12-172019-12-17 在 macOS 裡,直接執行 .py 的檔案,會顯示錯誤訊息: env: python3\r: No such file or directory 程式內容的開頭: #!/usr/bin/env python3 #encoding=utf-8 發生原因,程式的「Line Endings」使用了Windows 的格式,經測試使用 Mac OS 9 格式也會出錯,改用 Unix 格式程式就可以正常執行。 Debug, Python 相關文章 [Python] Find free disk space 2017-02-20 [Python] Requests 只取 HEADER 2021-05-112021-05-30 Pandas 練習題 2019-04-242019-04-24 上一篇文章下一篇文章