issp-center-dev / DCore

DMFT software for CORrelated Electrons
https://issp-center-dev.github.io/DCore/index.html
Other
44 stars 14 forks source link

Fix import importlib.util #138

Closed j-otsuki closed 7 months ago

j-otsuki commented 7 months ago

To avoid the following error in Python 3.11.5:

Traceback (most recent call last):
  File "/home/otsuki/venv/python3.11/dcore_e/bin/dcore_pre", line 5, in <module>
    from dcore.dcore_pre import run
  File "/home/otsuki/gitclones/dcore/src/dcore/dcore_pre.py", line 24, in <module>
    from dcore._dispatcher import HDFArchive
  File "/home/otsuki/gitclones/dcore/src/dcore/_dispatcher.py", line 22, in <module>
    if not importlib.util.find_spec(l):
           ^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'util'