Fix build script error.because 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 (#30796)

This commit is contained in:
season 2023-11-30 00:45:51 +08:00 committed by GitHub
parent dd9366bfe7
commit 53b0fa827d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ from __future__ import absolute_import, print_function, unicode_literals
import argparse
import codecs
import errno
import importlib
import importlib.util
import logging
import os
import sys