cannot import name 'MutableMapping' from 'collections'
csunlab opened this issue · comments
Hi. I installed Spyder (standalone version) on a new Macbook Pro and installed neupy with "pip install neupy". The installation went fine, but my code gets this error when I run it: "cannot import name 'MutableMapping' from 'collections'." I followed the solution in this video, but it did not solve my problem.
Any thoughts? Thank you.
In Python 3.10, collections.MutableMapping has been moved to the collections.abc module
Thanks. In the end, here's the fix that worked for me:
import collections
from collections import abc
from collections.abc import Mapping
collections.Mapping = collections.abc.Mapping
collections.MutableMapping = collections.abc.MutableMapping
collections.MutableSet = collections.abc.MutableSet
collections.Callable = collections.abc.Callable
collections.Iterable = collections.abc.Iterable