1

I'm using the raspberry pi 4 (pip version: pip 22.3.1, python version: 3.9.2) on visual studio code and whenever I enter the command pip install opencv-python in the terminal, after 40 mins I get the error message:

FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-armv7l-3.9/cmake-install/python/cv2/config-3.py' [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 Failed to build opencv-python ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects 

I have found a post on the same problem but the suggestion was to upgrade pip and try reinstalling opencv but that hasn't worked either. I'm using python 3.9.2 as an interpreter

When I use the command pip3 install --no-use-pep517 opencv-python I get the error:

error: subprocess-exited-with-e×ばつ python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-zwr61c7o/opencv-python_1867909748974f69a8333e238206f9df/setup.py", line 10, in import skbuild ModuleNotFoundError: No module named 'skbuild' [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed×ばつ Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
asked Jan 6, 2023 at 21:48

2 Answers 2

1

Don't fiddle with pip; just run

sudo apt install python3-opencv

which will install the prebuilt wheel

answered Jan 6, 2023 at 23:26
0
0

try by clearing cache and direct install by

 sudo pip install --no-cache-dir opencv-python
answered Feb 29, 2024 at 17:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.