Skip to main content
 首页 » 编程设计

Python 3.6 启动报错

2025年01月19日10sharpest

我是 python 的新手,我在我的 Windows 10 机器上安装了 Python 3.6(我相信它安装了 2.7 版)。安装没问题,但是当我尝试启动时出现错误,如下所示

Fatal Python error: Py_Initialize: unable to load the file system codec 
  File "C:\csvn\Python25\\lib\encodings\__init__.py", line 123 
    raise CodecRegistryError,\ 
                            ^ 
SyntaxError: invalid syntax 
 
Current thread 0x00002c78 (most recent call first): 

请有人帮助我识别此错误以及如何修复它。 非常感谢您的帮助。

请您参考如下方法:

可以通过添加指向Python安装位置的环境变量“PYTHONPATH”来解决该错误。

引用以下链接,

Py_Initialize fails - unable to load the file system codec