causalgraphicalmodels icon indicating copy to clipboard operation
causalgraphicalmodels copied to clipboard

ImportError: cannot import name 'Iterable' from 'collections'

Open t-tte opened this issue 3 years ago • 1 comments

When using Python version 3.9 and later,

from causalgraphicalmodels import CausalGraphicalModel

results in

ImportError: cannot import name 'Iterable' from 'collections'

The following fix is described here:

try:
    # Python <= 3.9
    from collections import Iterable
except ImportError:
    # Python > 3.9
    from collections.abc import Iterable

t-tte avatar Apr 19 '22 01:04 t-tte

I'm getting the same import error for Python 3.10 I tried to run from collections.abc import Iterable before from causalgraphicalmodels import CausalGraphicalModel but I still get the same error

EAly avatar Jul 16 '22 02:07 EAly