语法错误:第 1 行文件 C:\Python36\python.exe 中以“\x90"开头的非 UTF-8 代码,但未声明编码 [英] SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Python36\python.exe on line 1, but no encoding declared

查看:134
本文介绍了语法错误:第 1 行文件 C:\Python36\python.exe 中以“\x90"开头的非 UTF-8 代码,但未声明编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<块引用>

SyntaxError: 文件中以\x90"开头的非 UTF-8 代码C:\Python36\python.exe 在第 1 行,但没有声明编码

我不明白为什么当我想打开解释器时它会显示给我.有人可以帮我吗?

解决方案

就我而言,我尝试使用 python.exe 来打开已经可执行的脚本

>path/to/python.exe path/to/script.exe

并看到了这个不太容易理解的错误.

解决方案是自己运行可执行文件,而不像

那样调用python

>路径/到/script.exe

SyntaxError: Non-UTF-8 code starting with '\x90' in file
C:\Python36\python.exe on line 1, but no encoding declared

I don't understand why it shows me that when I want to open the interpreter. Can someone help me please?

解决方案

In my case I've tried to open already executable script using python.exe like

> path/to/python.exe path/to/script.exe

and saw this not-so-trivial-to-understand error.

Solution is to run executable by itself without invoking python like

> path/to/script.exe

这篇关于语法错误:第 1 行文件 C:\Python36\python.exe 中以“\x90"开头的非 UTF-8 代码,但未声明编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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