pySmithPlot icon indicating copy to clipboard operation
pySmithPlot copied to clipboard

cannot import name 'Iterable' from 'collections'

Open deep2p4ce opened this issue 2 years ago • 0 comments

I got following error: cannot import name 'Iterable' from 'collections' It occurs when trying to import smithplot whilst using python 3.10.4 on the arch based linux distro 'Garuda Linux'.

The cause of this error: Apparently the 'collections' module once contained the 'collections.abc' module that provides abstract base classes such as 'Iterable'. This was the case prior to python version 3.3. See https://docs.python.org/3/library/collections.abc.html

To fix this you need to replace line 39 ('from collections import Iterable') in smithaxes.py with 'from collections.abc import Iterable' AND line 4 ('from collections import Iterable') in smithhelper.py with 'from collections.abc import Iterable'

deep2p4ce avatar Apr 20 '22 08:04 deep2p4ce