Running python code give NameError: name 'ABCMeta' is not defined every time

Running python code give NameError: name 'ABCMeta' is not defined every time

我正在使用 Python 3.7.3 和 PyCharm。当我尝试将 abc 包导入到我的项目中时,我收到此错误,然后是 Python quit unexpectedly 警报对话框:

Fatal Python error: init_sys_streams: can't initialize sys standard streams
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/io.py", line 52, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/abc.py", line 166, in <module>
NameError: name 'ABCMeta' is not defined
Abort trap: 6

一开始并没有太在意这个错误,还以为是我代码写错了。所以我评论了 import abc 行。但是错误并没有消失。此外,每次我使用 运行ning python3 程序时,我都会遇到同样的错误。即使在终端:

删除 /Library/Frameworks/Python.framework 文件并重新安装 python 3.7.3 解决了错误