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:
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".
It seems you try to run your executable with
python hello.exe
while the point of creating an executable using py2exe
is that you don't need to use the python interpreter anymore. So the error is actually not related to an encoding problem at all (though the error message might imply this) but just a consequence of calling python with a binary file.