Python 3.6 启动报错

标签 python windows

我是 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

关于Python 3.6 启动报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47693631/

相关文章:

python - 如何从非声明性对象自动生成 SQLAlchemy 架构?

python - Pandas python 通过另一个列值从列表列中随机选择值

database - 拒绝连接到 PostgreSQL 服务器

python - 获取事件窗口的名称

python - ScrollLabel 产生 ValueError

python - 如何返回值 If One List Against Another Dataframe (Pandas)?

Javascript 到 Python,在 for 循环的条件和最终表达式中按位移位

windows - 更新数 GB 程序的最佳方式(DVD 实现?更新软件?)

windows - 如何打印到控制台窗口?

c# - 如何确定帐户的类型(AD 用户与 AD 组)?