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

牧云@^-^@ 提交于 2019-11-28 14:19:48

Ok, it's a wrong value for PYTHONSTARTUP which was asking me a problem. Thank you all !

Python 3 assumes scripts are saved with UTF-8 encoding. The script being executed (from PYTHONSTARTUP?) is not UTF-8-encoded. If you know the encoding, you can add it to the top of the script with:

#coding:cp1252     (or whatever the encoding is).

Or just re-save the script in UTF-8.

See also PEP 0263.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!