AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
Author: storm-1614Created Jul 30, 2026Updated Jul 30, 2026
I used the following command to install scikit-opt from AUR.
yay -S python-scikit-optimize-gitBut during the build phase, the following error occurred:
==> Starting build()...
Traceback (most recent call last):
File "/home/storm/.cache/yay/python-scikit-optimize-git/src/scikit-optimize/setup.py", line 2, in <module>
from setuptools import setup
File "/home/storm/.local/lib/python3.14/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/home/storm/.local/lib/python3.14/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/home/storm/.local/lib/python3.14/site-packages/pkg_resources/__init__.py", line 2191, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
==> ERROR: A failure occurred in build().
Aborting...
-> error making: python-scikit-optimize-git-exit status 4
-> Failed to install the following packages. Manual intervention is required:
python-scikit-optimize-git - exit status 4The error is attributed to Python version compatibility.My computer's Python version is 3.14.6, but I found that pkgutil.ImpImporter has already been deprecated and removed in Python3.12.
Can it be fixed to support the latest version of Python?
Source: guofei9987/scikit-opt