Skip to content
New issue

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

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

Already on GitHub? # to your account

No module named 'skbuild' for pip 21.1.2 #491

Closed
devm21 opened this issue May 26, 2021 · 5 comments
Closed

No module named 'skbuild' for pip 21.1.2 #491

devm21 opened this issue May 26, 2021 · 5 comments

Comments

@devm21
Copy link

devm21 commented May 26, 2021

Expected behaviour

this happens on python setup.py bdist_wheel

Actual behaviour

Error: ModuleNotFoundError: No module named 'skbuild'

Steps to reproduce

cloned open-cv python
cd into open-cv python
run python setup.py bdist_wheel

Suggested solution on README is pip install --upgrade pip, but it does not work in pip version 21

@skvark
Copy link
Member

skvark commented May 26, 2021

You must run pip wheel . --verbose. The command you used does not use pip and is not recommended as explained in the README. pyproject.toml defines the build-time dependencies which are used by pip and only pip.

If you need to use the python setup.py bdist_wheel command, then install the dependencies manually: https://github.com/opencv/opencv-python#manual-debug-builds

@devm21
Copy link
Author

devm21 commented May 26, 2021

i see, i was reading off #126 (comment)

is python setup.py bdist_wheel simply not recommended now?
I fixed the issue by reinstalled opencv-python + recompile opencv, but was wondering if there is a way to do that through pip like pip install opencv-contrib-python-non-free or some pre-built wheels for non-free opencv libs.

@skvark
Copy link
Member

skvark commented May 27, 2021

Yeah, that's an old comment. However, it still works if you install scikit-build and numpy before running it.

Manual local build (by cloning this repository and submodules):

  1. git clone --recursive https://github.com/opencv/opencv-python.git
  2. cd opencv-python
  3. pip install scikit-build numpy
  4. export CMAKE_ARGS="-DOPENCV_ENABLE_NONFREE=ON"
  5. python setup.py bdist_wheel

Manual build with pip from PyPI source tarballs (the easiest way, as documented in the README):

  1. export CMAKE_ARGS="-DOPENCV_ENABLE_NONFREE=ON"
  2. pip install --no-binary opencv-python opencv-python

@skvark
Copy link
Member

skvark commented May 27, 2021

I fixed the issue by reinstalled opencv-python + recompile opencv, but was wondering if there is a way to do that through pip like pip install opencv-contrib-python-non-free or some pre-built wheels for non-free opencv libs.

It's not legal to redistribute commercial / patented algorithms as pre-built binaries so there are no such packages available. This is explained in the FAQ in the README as well as in the issue you linked.

@devm21
Copy link
Author

devm21 commented Jun 3, 2021

@skvark all good, closing the issue. thanks for the explanations.

@devm21 devm21 closed this as completed Jun 3, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants