【发布时间】:2022-01-06 10:58:06
【问题描述】:
所以,我刚刚安装了 Ubuntu,并尝试运行一个非常简单的 Python 项目。第一次运行时,我收到了 collections.abc 弃用警告,提示我确保我的项目是最新的。
经过进一步调查,我发现仅运行 py 命令会导致此弃用警告,如下所示:
Documents$ py
/usr/bin/py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import Iterable
有什么办法可以解决这个问题吗?我已经从系统中删除了 Python 2,并确保 Python 3 是最新的。
【问题讨论】:
标签: python python-3.x linux ubuntu