ImportError-cannot import name Iterabler from collections python 3-10

The Iterable abstract class was removed from collections in Python 3.10. See the deprecation note in the 3.9 collections docs.
There are couple of ways to fix the above error.

  • Use any previous version of Python3.3+
  • import from class
In [1]:
import sys
'3.9.7 (default, Sep 16 2021, 13:09:58) \n[GCC 7.5.0]'
In [2]:
from collections import Iterable
/tmp/ipykernel_3591499/ DeprecationWarning: Using or importing the ABCs from 'collections' instead of from '' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Iterable

Note the warning above but since version is python3.9, it works.

In Python 3.10, above command will output following error.
ImportError: cannot import name 'Iterable' from 'collections'

To resolve above error, import from

In [3]:
from import Iterable