guofei9987 / guofei9987/scikit-opt
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I used the following command to install scikit-opt from AUR.
```
yay -S python-scikit-optimize-git
```
But 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
from setuptools import setup
File "/home/storm/.local/lib/python3.14/site-packages/setuptools/__init__.py", line 16, in
import setuptools.version
File "/home/storm/.local/lib/python3.14/site-packages/setuptools/version.py", line 1, in
import pkg_resources
File "/home/storm/.local/lib/python3.14/site-packages/pkg_resources/__init__.py", line 2191, in
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 4
```
The 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?
Contributor guide
Research direction
Start by reproducing the reported `yay -S python-scikit-optimize-git` build with Python 3.14.6 and inspect setup.py together with the setuptools/pkg_resources versions in the traceback. Check the project’s packaging requirements and verify that the package builds successfully on the latest supported Python version without the pkgutil.ImpImporter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100