itdxer / neupy

NeuPy is a Tensorflow based python library for prototyping and building neural networks

Home Page:http://neupy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

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