在终端中,我可以成功运行 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):
最佳答案
删除“PYTHONHOME”环境变量。 (这解决了我安装 python27 x86 和 python36 x64 时的问题)
关于python - 我同时安装了 python 2.7 和 3.5,但是 python 3.5 不能正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37529960/