vMeijin / pySmithPlot

Matplotlib extension for creating Smith charts with Python
127 stars 73 forks source link

cannot import name 'Iterable' from 'collections' #34

Open deep2p4ce opened 2 years ago

deep2p4ce commented 2 years ago

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'