I am trying to install opencv-python on my on **Rasberry PI 2 ** but I always run in this error.
I thought it was because it is not possible to install OpenCV using pip on Python3.9, so I have downgrade to Python3.6 but the error is still the same.
I also tried upgrading my set-up tool wheel with pip install --upgrade pip setuptools wheel
but nothing changed.
Do you have an idea what can possibly be?
`pi@raspberrypi:~/dataAquisition $ pip3 install opencv-python
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting opencv-python
Using cached opencv-python-4.10.0.84.tar.gz (95.1 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting numpy>=1.17.0 (from opencv-python)
Using cached https://www.piwheels.org/simple/numpy/numpy-2.0.0-cp39-cp39-linux_armv7l.whl (5.8 MB)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml) … error
error: subprocess-exited-with-error
× Building wheel for opencv-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
patching file opencv/3rdparty/openexr/IlmImf/ImfSystemSpecific.cpp
/tmp/pip-build-env-qbrhbnub/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File “/tmp/pip-build-env-qbrhbnub/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py”, line 643, in setup
cmkr = cmaker.CMaker(cmake_executable)
File “/tmp/pip-build-env-qbrhbnub/overlay/lib/python3.9/site-packages/skbuild/cmaker.py”, line 145, in init
self.cmake_version = get_cmake_version(self.cmake_executable)
File “/tmp/pip-build-env-qbrhbnub/overlay/lib/python3.9/site-packages/skbuild/cmaker.py”, line 102, in get_cmake_version
raise SKBuildError(msg) from err
Problem with the CMake installation, aborting build. CMake executable is /tmp/pip-build-env-qbrhbnub/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake
[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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (opencv-python)
`
I thought it was because it is not possible to install OpenCV using pip on Python3.9, so I have downgrade to Python3.6 but the error is still the same.