PyCharm. /usr/bin/python^M: bad interpreter(PyCharm./usr/bin/python^M: 错误的解释器)
问题描述
不知道在 PyCharm 中更改 EOF 的位置.我的脚本,开始于:
Cannot figure out, where to change EOF in PyCharm. My scripts, started with:
#!/usr/bin/python
# -*- coding: utf-8 -*-
当我尝试像可执行文件(chmode +x)一样运行它时,输出类似这样的内容:
Outputs something like this, when I try to run it like executable (chmode +x):
-bash: ./main.py:/usr/bin/python^M: 错误的解释器:没有这样的文件或目录
-bash: ./main.py: /usr/bin/python^M: bad interpreter: No such file or directory
做什么以及如何做?
推荐答案
设置行分隔符为Unix:
这篇关于PyCharm./usr/bin/python^M: 错误的解释器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!