I’m trying to install OpenCV on my Raspberry Pi using pip, but I’m running into the following error:
ERROR: Failed building wheel for opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-armv7l-3.9/cmake-install/python/cv2/config-3.py'
I’m using:
Platform: Raspberry Pi (Linux ARMv7)
Python version: 3.9
Installation command: pip install opencv-python
What I’ve Tried:
Updating pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel
Ensuring build tools like cmake and required libraries are installed
sudo apt-get update
sudo apt-get install cmake g++ libatlas-base-dev libjpeg-dev libpng-dev
Error Details:
It seems the build process fails to locate certain files or directories, and I suspect it may be related to the PEP 517 build system or missing dependencies.
How can I resolve this issue and successfully install OpenCV on my Raspberry Pi?
Is there an alternative way to install OpenCV without building it from source (e.g., precompiled binaries)?
Any help or guidance would be appreciated. Thanks!
sagar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5