PyCharm./usr/bin/python^M: 错误的解释器 [英] PyCharm. /usr/bin/python^M: bad interpreter

查看:34
本文介绍了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: 错误的解释器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆