AttributeError: module ‘importlib‘ has no attribute ‘util‘

Traceback (most recent call last):
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/remote/kernel_build_server_gpu.py”, line 87, in
messager.run()
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/remote/kernel_build_server.py”, line 119, in run
self.loop()
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/remote/kernel_build_server.py”, line 116, in loop
self.handle()
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/remote/kernel_build_server_gpu.py”, line 56, in handle
res = self.akg_builder.compile()
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/remote/kernel_build_server.py”, line 33, in compile
return self.akg_builder.compile()
File “/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/akg_process.py”, line 128, in compile
res.get(timeout=self.wait_time)
File “/usr/local/python-3.7.5/lib/python3.7/multiprocessing/pool.py”, line 657, in get
raise self._value
AttributeError: module ‘importlib’ has no attribute ‘util’

Starting with Python 3.9, the util module was moved from importlib to a separate top-level module called importlib.util. Therefore, if you are using Python 3.9 or later and you receive an AttributeError stating that module 'importlib' has no attribute 'util', it is likely due to a compatibility issue with your code. You can fix this issue by updating your code to import importlib.util directly. For example:

from importlib.util import find_spec

If you are using an earlier version of Python, it is possible that the importlib module does not have a util attribute at all, in which case you should check your code for any typos or misspellings.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

irrationality

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值