摘要
- 情况1:IOException: Cannot run program "python /temporary2/plus_non_main.py": error=2, No such file or directory
情况2:SyntaxError: Non-ASCII character '\xe6' in file /temporary2/plus_include_main.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
情况1:IOException: Cannot run program "python /temporary2/plus_non_main.py": error=2, No such file or directory
==原因==:python不认识
==解决方法==:
将python的执行改为绝对路径,也就是找到python.exe的所在位置
情况2:SyntaxError: Non-ASCII character '\xe6' in file /temporary2/plus_include_main.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
==原因==:py脚本定义的def函数中使用’’’注释快’’进行注释’’’
def plus2(a, b):
'''# 有参数2-》网页方法3,试着传参数进去'''
return (a + b)
==解决方案==:def定义的函数中使用“#单行注释”