解决方案:

from collections import Iterable, Iterator

改为:

from collections.abc import Iterable, Iterator

即可.