Home > other >  For help, python can't use after installation error init_stdio_encoding
For help, python can't use after installation error init_stdio_encoding

Time:12-01

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

The Current thread 0 x00004404 (most recent call first) :


An error as above,

System: Windows 64
Version: python 3.8.3

CodePudding user response:

The problem to find the answer, for two reasons:
1, PC installed mingw environment, mingw installed python2.7;
2, mingw installed python2.7 environment variable is problematic, as follows,
PYTHONIOENCODING: 8

Modified method:
1, unload installed python 3.8.3;
2, to modify environment variables, as follows:
PYTHONIOENCODING: UTF8

The measured python can be normal use, running version is python2.7,

In order to use the latest version of python
1, unload mingw environment, delete python2.7;
2, installation python3.8.3;

The measured python can be normal use, running version is python3.8.3,
  • Related