Skip to content

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

@deep2p4ce

Description

@deep2p4ce

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions