jensengroup / RegioML

RegioML predicts the regioselectivity of electrophilic aromatic substitution reactions using machine learning.
MIT License
6 stars 4 forks source link

The attribute MutableMapping from the module collections got moved into collections.abc in Python 3.10 #2

Closed NicolaiRee closed 1 year ago

NicolaiRee commented 1 year ago

Problem with "/DescriptorCreator/PartialChargeDict.py" when using Python 3.10 as the attribute MutableMapping from the module collections got moved into collections.abc**

Solution:

Change the following in "/DescriptorCreator/PartialChargeDict.py":

import collections

class PartialChargeDict(collections.MutableMapping): 

Into:

import sys
import collections 

if sys.version_info.major == 3 and sys.version_info.minor >= 10:
    from collections.abc import MutableMapping
else:
    from collections import MutableMapping

class PartialChargeDict(MutableMapping):