[Python] Fatal Python error: Py_Initialize: can’t initialize sys standard streams

在使用 PyCharm時遇到這一個 Error:

/Users/chunyuyao/PycharmProjects/HelloMax/hello.py
Fatal Python error: Py_Initialize: can’t initialize sys standard streams
Traceback (most recent call last):
File “/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/io.py”, line 52, in <module>
File “/Users/chunyuyao/PycharmProjects/HelloMax/abc.py”, line 1, in <module>
RuntimeError: lost sys.stdout

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

解法:

a file named abc.py, remove that file in your project, your error will disappear.

真的很神奇耶!誰會知道不能使用 abc.py 這個檔案。

相關文章

寫留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *