【发布时间】:2017-11-09 18:59:23
【问题描述】:
在终端中,我可以成功运行py -2。
尽管如此,
C:\Users\user>py -3
Fatal Python error: Py_Initialize: unable to load the file system codec
File "C:\Python27\lib\encodings\__init__.py", line 123
raise CodecRegistryError,\
^
SyntaxError: invalid syntax
Current thread 0x00004570 (most recent call first):
【问题讨论】:
-
我猜使用
python3而不是py -3在您的系统上不起作用? -
从环境变量访问python时有可能发生冲突。所以走到python3的安装路径,然后使用命令。
标签: python python-2.7 python-3.x