Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build wheel fails for opencv-python-headless #651

Closed
yahyaakli opened this issue Apr 6, 2022 · 3 comments
Closed

Build wheel fails for opencv-python-headless #651

yahyaakli opened this issue Apr 6, 2022 · 3 comments

Comments

@yahyaakli
Copy link

yahyaakli commented Apr 6, 2022

I am using docker Alpine linux and I've been having issues with building wheel for opencv-python-headless. Everytime I run it I get this error:

**Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-uka6wdi1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-uka6wdi1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir        
          self.run_setup()
        File "/tmp/pip-build-env-uka6wdi1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 281, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-uka6wdi1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 448, in <module>
          main()
        File "setup.py", line 210, in main
          skbuild.setup(
        File "/tmp/pip-build-env-uka6wdi1/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 676, in setup
          _classify_installed_files(
        File "setup.py", line 388, in _classify_installed_files_override
          return (cls.wraps._classify_installed_files)(
      TypeError: _classify_installed_files() got an unexpected keyword argument 'cmake_install_dir'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for opencv-python-headless**

(I am using alpine:3.14)

This seemed to me as a code issue.

Please, do you have any feedback on this issue?

Thank you.

@rooseveltrp
Copy link

I'm trying to build and getting the exact same error. Using nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 image.

@skvark
Copy link
Member

skvark commented Apr 6, 2022

Duplicate of #648

@skvark skvark marked this as a duplicate of #648 Apr 6, 2022
@rooseveltrp
Copy link

The PR mentioned #648 does solve the issue. Here's my output:

$ git clone --recursive https://github.com/orbisvicis/opencv-python.git
$ cd opencv-python
$ git checkout 96cffde198e5bc3411a9577b97021ce59477f97a
$ pip wheel . --verbose
...
  adding 'opencv_python-4.5.5+96cffde.dist-info/top_level.txt'
  adding 'opencv_python-4.5.5+96cffde.dist-info/RECORD'
  removing _skbuild/linux-x86_64-3.6/setuptools/bdist.linux-x86_64/wheel
  Building wheel for opencv-python (pyproject.toml) ... done
  Created wheel for opencv-python: filename=opencv_python-4.5.5+96cffde-cp36-cp36m-linux_x86_64.whl size=28270789 sha256=11bfcaa97fd397dca117db96126b157e074f07f0ad8d1b6285faee4ef4be12c5
  Stored in directory: /root/.cache/pip/wheels/00/12/be/0f0afacf8c6e9a933c55fedf8e9168985722099e5a84c4ec10
Successfully built opencv-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants