Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Incompatible setuptools==59.2.0 with Python 3.12 due to pkgutil.ImpImporter removal for version 84. #1096

Open
@ramnathnayak-ibm

Description

@ramnathnayak-ibm

Description

When attempting to installopencv-python-headless for the version4.10.0.84 or84 usingpip install . on Python 3.12 (specifically tested onppc64le architecture), the installation fails with the following error:

  File "E:\dev\py\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>            main()          File "E:\dev\py\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main            json_out['return_val'] = hook(**hook_input['kwargs'])                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^          File "E:\dev\py\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in get_requires_for_build_wheel            backend = _build_backend()                      ^^^^^^^^^^^^^^^^          File "E:\dev\py\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend            obj = import_module(mod_path)                  ^^^^^^^^^^^^^^^^^^^^^^^          File "E:\dev\py\Lib\importlib\__init__.py", line 90, in import_module            return _bootstrap._gcd_import(name[level:], package, level)                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          File "<frozen importlib._bootstrap>", line 1293, in _gcd_import          File "<frozen importlib._bootstrap>", line 1266, in _find_and_load          File "<frozen importlib._bootstrap>", line 1216, in _find_and_load_unlocked          File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed          File "<frozen importlib._bootstrap>", line 1293, in _gcd_import          File "<frozen importlib._bootstrap>", line 1266, in _find_and_load          File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked          File "<frozen importlib._bootstrap>", line 841, in _load_unlocked          File "<frozen importlib._bootstrap_external>", line 994, in exec_module          File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed          File "C:\Users\shikingram\AppData\Local\Temp\pip-build-env-pk9ws81z\overlay\Lib\site-packages\setuptools\__init__.py", line 16, in <module>            import setuptools.version          File "C:\Users\shikingram\AppData\Local\Temp\pip-build-env-pk9ws81z\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>            import pkg_resources          File "C:\Users\shikingram\AppData\Local\Temp\pip-build-env-pk9ws81z\overlay\Lib\site-packages\pkg_resources\__init__.py", line 2172, in <module>            register_finder(pkgutil.ImpImporter, find_on_path)                            ^^^^^^^^^^^^^^^^^^^        AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?        [end of output]      note: This error originates from a subprocess, and is likely not a problem with pip.  error: subprocess-exited-with-error

This is due tosetuptools==59.2.0 relying onpkgutil.ImpImporter, which has been removed in Python 3.12 (Python 3.12 changelog).

Reproduction

  1. Set up a Python 3.12 virtual environment
  2. Runpip install . in theopencv-python-headless source directory for the version 84.
  3. Build fails due to incompatible setuptools version

Diagnosis

Older versions (e.g.84) of the project set:

requires = ["setuptools==59.2.0"]

In the newer version i.e. 86 this is taken care of:

requires = ["setuptools<70.0.0; python_version>='3.12'"]

Would you like me to check if an issue or PR already exists for this, or help prepare a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp