Python3.10 ImportError: cannot import name ‘Mapping‘ from ‘collections‘ (/usr/local/lib/python3.10

在我的linux环境里装了python2 和python3.6,后来出了这个问题,查了资料,将~/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py的

"from collections import Mapping" 改为"from collections.abc import Mapping"

你可能感兴趣的:(python,pytorch,开发语言)