首页 > 解决方案 > 当我尝试使用 PIP 安装库时,出现 AttributeError: module 'collections' has no attribute 'Iterable'

问题描述

我刚刚在我的新电脑上安装了 python3 并尝试使用 pip 安装一些库(numpy、cython、cymem),但我得到了 AttributeError: module 'collections' has no attribute 'Iterable' 但是安装了 nltk 和 cytest 之类的库没问题。有没有人对此有解决方案

标签: pythonnumpycythoncythonize

解决方案


collections.Iterable 已弃用。将其替换为 collections.abc.Iterable。

请参阅此答案以了解兼容性: https ://stackoverflow.com/a/53978543/13369176


推荐阅读