Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'Mapping' from 'collections' #27

Open
markfansjsu006 opened this issue Feb 24, 2023 · 1 comment
Open

Comments

@markfansjsu006
Copy link

temp_image

I am using python 3.10 and I am having trouble training data when testing the installation.

@stasiek-j
Copy link

stasiek-j commented Apr 13, 2023

Since python 3.10 Mapping is moved to collections.abc, quick fix would be to change:

from collections import Mapping, defaultdict

to

from collections import defaultdict

try:
    from collections.abc import Mapping
except ImportError:
    from collections import Mapping

However, I don't know if there maybe is some better way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants