Using #-*- coding: utf-8 -*- does not remove “Non-ASCII character '\x90' in file hello.exe on line 1, but no encoding declared” error

前端 未结 2 747
囚心锁ツ
囚心锁ツ 2020-12-11 10:16

I\'m trying to convert a python file into an executable. So far so good. But when I try to run the executable I get the following error message:

SyntaxError:         


        
2条回答
  •  一向
    一向 (楼主)
    2020-12-11 10:57

    As someone else mentioned, you are running "python hello.exe" or "py hello.exe". So you are trying to run an executable with python.. Try just running the executable without python.

    You simply need to run "hello.exe".

提交回复
热议问题