pip3命令报以下错误:ttributeError: module 'collections' has no attribute 'MutableMapping'。怎么解决?
这个错误通常出现在Python 3.7及更早版本中,因为在这些版本中,collections模块中的MutableMapping类被移到了collections.abc模块中。解决这个问题的方法是升级Python版本或者引入collections.abc模块,如下所示:
from collections.abc import MutableMapping
# your code here
这样就可以使用MutableMapping类了。
原文地址: https://www.cveoy.top/t/topic/twU 著作权归作者所有。请勿转载和采集!