模块 'xml.dom' 没有属性 'Node'

Module 'xml.dom' has no attribute 'Node'

我想在 Python 3.7 中使用模块 xml,但是我收到以下错误:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> from xml.dom import minidom
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from xml.dom import minidom
  File "C:\Users\EMurairi18\AppData\Local\Programs\Python\Python37-32\lib\xml\dom\minidom.py", line 30, in <module>
    _nodeTypes_with_children = (xml.dom.Node.ELEMENT_NODE,
AttributeError: module 'xml.dom' has no attribute 'Node'
>>> 

这有什么问题吗?

尝试重现安装 python3.7.0 时的错误,但一切正常。也许在该安装中存在包冲突(这可以通过在 python 虚拟环境中管理依赖项或任何类似选项来防止),或者如果有的话,问题可能已解决。