pnpnpn / dna2vec

dna2vec: Consistent vector representations of variable-length k-mers
MIT License
182 stars 60 forks source link

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

Open markfansjsu006 opened 1 year ago

markfansjsu006 commented 1 year ago

temp_image

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

stasiek-j commented 1 year ago

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.