Fatal Python error: Py

it2024-06-30  40

问题描述:

Windows 10 Python 3.6 在终端输入任何指令都报如下错误:

Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: 65001

解决方法:

在终端输入

set PYTHONIOENCODING=utf-8

问题原因:

Windows cmd命令行编码问题导致python无法使用。

参考:

https://stackoverflow.com/questions/35176270/python-2-7-lookuperror-unknown-encoding-cp65001

最新回复(0)