我收到一个属性错误:当我尝试使用 PIP 安装库时,模块'collections'没有属性'Iterable'



我刚刚在我的新电脑上安装了python3,并尝试使用pip安装一些库(numpycythoncymem(,我得到

AttributeError: module 'collections' has no attribute 'Iterable'

但是像nltkcytest这样的库安装正常

集合。可迭代已弃用。 将其替换为collections.abc.Iterable。

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

由于这是一个通常发生在库代码中而不是我的问题,因此快速修复可能是

import collections

import collections.abc as collections

并在相应项目的存储库中填充错误。

相关内容

最新更新