报错ImportError: cannot import name 'Iterable' from 'collections' in Python

参考https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python

答案为 3.10版本的python把Iterable从collections去除了,原答案粘贴如下:文字版和截图

 

The Iterable abstract class was removed from collections in Python 3.10. See the deprecation note in the 3.9 collections docs. In the section Removed of the 3.10 docs, the item

is what results in your error.

You can use Iterable from collections.abc instead, or use Python 3.9 if the problem is in a dependency that can't be updated.

 

 

posted on 2023-05-28 16:28  无声烟雨  阅读(1191)  评论(0编辑  收藏  举报

导航