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

16,923

In my case I got this error on running pyinstaller's exe file from cmd and it automatically got fixed when I ran that file by directly clicking on it NOT from cmd

So, to fix this problem don't run file from terminal/cmd, try any other way.

Share:
16,923
Beno
Author by

Beno

Updated on June 20, 2022

Comments

  • Beno
    Beno almost 2 years
    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?

    snap shot

  • christopherson
    christopherson almost 4 years
    Could you please provide what value PYTHONSTARTUP was and currently is?
  • Heewoon
    Heewoon about 2 years
    Note that this is because of Python's encoding language based on "unicode-escape" when ran on the terminal. The command-line utility changes this. Double click this from File Explorer.