【Python】报错cannot import name ‘Mapping‘ from ‘collections‘
·
这是因为Python版本更新导致的,在Python3.3之前,Mapping是可以直接在collections包导入,但是在Python3.3版本之后,要改成:
from collections.abc import Mapping
更多推荐
这是因为Python版本更新导致的,在Python3.3之前,Mapping是可以直接在collections包导入,但是在Python3.3版本之后,要改成:
from collections.abc import Mapping
更多推荐
所有评论(0)