自己创建的文件名不能叫abc.py,不然会报如下错误
Fatal Python error: init_sys_streams: can’t initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
File “D:Anacondalibio.py”, line 72, in
AttributeError: module ‘abc’ has no attribute ‘ABCmeta’
参考:
If you name your file abc.py you’re shadowing the standard library’s abc (abstract base class). When you do that, everything that depends on the built-in abc will get yours instead. Unless you’ve essentially rewritten the standard library’s code, things will break.
– Ernst Jun 28, 2018 at 9:57



