HELP! Python 3.8.3 error init_stdio_encoding

C:\Users\JoJo>python
Fatal Python error: init_stdio_encoding: failed to get the Python codec name of the stdio encoding
Python runtime state: core initialized
LookupError: unknown encoding: 8

Current thread 0x00004404 (most recent call first):

I’ve tried reloading and configuring the build environment, but nothing worked.

set PYTHONIOENCODING=“UTF-8” on CMD
export PYTHONIOENCODING=“UTF-8” on any sort of posix

In Windows CMD, use set PYTHONIOENCODING=UTF-8, without quotes. CMD does not strip quotes from environment variables and command-line arguments. In a POSIX shell, export PYTHONIOENCODING="UTF-8" does strip the quotes. The interpreter apparently allows a quoted string in PYTHONIOENCODING. But in general for environment variables, it’s not normal or expected.

In Windows, PYTHONIOENCODING is applicable either if a standard stream (i.e. stdin, stdout, or stderr) is redirected from the console (e.g. to a pipe) or if PYTHONLEGACYWINDOWSTDIO is set. Otherwise, console I/O is always Unicode. However, even if PYTHONIOENCODING isn’t used, setting it to an unknown encoding such as “8” will cause the interpreter to fail at startup.