python stopped working on anaconda prompt startup

2019-08-02 14:04发布

问题:

Recently i have installed anaconda 64 bit python 3 version on my laptop. when i started anaconda prompt, it shows error of "Python has stopped working"

This is error in prompt,

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

I have done enough search but couldn't find anything. Please help me resolve this error.

thank you.

回答1:

This error seems to usually be because the pythonhome environment variable is not set.

See the first comment on the answer in this stack overflow post Python3 installed successfully, but cannot be opened in terminal



回答2:

I got the rid of error. Since i had python 2.7 installed and was trying to install anaconda with python 3.

I had to uninstall python 2.7, now it works fine. Thank you.