Failed to build opencv-python ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
Experiencing a similar issue with Python3.11, found those stack overflow workaround as well but no luck here either.
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.7.0.72.tar.gz (91.1 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [345 lines of output]
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.9" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_system != "Darwin"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Darwin"' don't match your environment
Collecting setuptools==59.2.0
Using cached https://www.piwheels.org/simple/setuptools/setuptools-59.2.0-py3-none-any.whl (952 kB)
Collecting wheel==0.37.0
Using cached https://www.piwheels.org/simple/wheel/wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting cmake>=3.1
Using cached cmake-3.25.2.tar.gz (33 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting pip
Using cached https://www.piwheels.org/simple/pip/pip-23.0.1-py3-none-any.whl (2.1 MB)
Collecting scikit-build>=0.13.2
Using cached https://www.piwheels.org/simple/scikit-build/scikit_build-0.16.7-py3-none-any.whl (79 kB)
Collecting numpy==1.22.0
Using cached numpy-1.22.0-cp311-cp311-linux_armv7l.whl
Collecting distro
Using cached https://www.piwheels.org/simple/distro/distro-1.8.0-py3-none-any.whl (20 kB)
Collecting packaging
Using cached https://www.piwheels.org/simple/packaging/packaging-23.0-py3-none-any.whl (42 kB)
Building wheels for collected packages: cmake
Building wheel for cmake (pyproject.toml): started
Building wheel for cmake (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for cmake (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [300 lines of output]
--------------------------------------------------------------------------------
-- Trying 'Ninja' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-eyph__xi/cmake_86093e953afc4d6cb97877873349b482/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Ninja' generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying 'Unix Makefiles' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
Not searching for unused variables given on the command line.
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:3 (ENABLE_LANGUAGE)
-- The C compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:4 (ENABLE_LANGUAGE)
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-eyph__xi/cmake_86093e953afc4d6cb97877873349b482/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-eyph__xi/cmake_86093e953afc4d6cb97877873349b482/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Unix Makefiles' generator - failure
--------------------------------------------------------------------------------
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cmake:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) If on Linux, with glibc < 2.12, you can set PIP_ONLY_BINARY=cmake in
order to retrieve the last manylinux1 compatible wheel.
3) If on Linux, with glibc < 2.12, you can cap "cmake<3.23" in your
requirements in order to retrieve the last manylinux1 compatible wheel.
4) Open an issue with the debug information that follows at
https://github.com/scikit-build/cmake-python-distributions/issues
Python: 3.11.2
platform: Linux-5.4.0-144-generic-armv7l-with-glibc2.28
glibc: glibc 2.28
machine: armv7l
bits: 32
pip: n/a
setuptools: 67.5.1
scikit-build: 0.16.7
PEP517_BUILD_BACKEND=setuptools.build_meta
=============================DEBUG ASSISTANCE=============================
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building Linux wheels for Python 3.11 requires a compiler (e.g gcc).
But scikit-build does *NOT* know how to install it on raspbian
To build compliant wheels, consider using the manylinux system described in PEP-513.
Get it with "dockcross/manylinux-x86" docker image:
https://github.com/dockcross/dockcross#readme
For more details, please refer to scikit-build documentation:
http://scikit-build.readthedocs.io/en/latest/generators.html#linux
********************************************************************************
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cmake
Failed to build cmake
ERROR: Could not build wheels for cmake, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.```
@skvark I'm trying to install opencv-python 4.7.0.72 on Ubuntu and I'm using python 3.6 .
I know that python 3.6 is depricated but I have to use python 3.6 for some project. Is this possible to install opencv-python 4.7.0.72 on python 3.6 ?
Jihyun0510, univanxx, julia8468bd, AlexandrMilko, seojupal, DH-O, fucker007, laurentbenaroya, tommy-kay, Weaverson, and 21 more reacted with thumbs up emoji
kaerma reacted with laugh emoji
KishorKaphle, dannychua, and kaerma reacted with heart emoji
All reactions
Collecting opencv-python
Using cached opencv-python-4.8.1.78.tar.gz (92.1 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [240 lines of output]
Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.9" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_system != "Darwin"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Darwin"' don't match your environment
Collecting cmake>=3.1
Obtaining dependency information for cmake>=3.1 from https://files.pythonhosted.org/packages/02/ba/9d83d76ad80167315f7e57d20055062024868f7ee4f153a8e6b6f6aaf332/cmake-3.27.6-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata
Using cached cmake-3.27.6-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (6.7 kB)
Collecting numpy==1.22.2
Using cached numpy-1.22.2.zip (11.4 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting pip
Obtaining dependency information for pip from https://files.pythonhosted.org/packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl.metadata
Using cached pip-23.2.1-py3-none-any.whl.metadata (4.2 kB)
Collecting scikit-build>=0.14.0
Obtaining dependency information for scikit-build>=0.14.0 from https://files.pythonhosted.org/packages/fa/af/b3ef8fe0bb96bf7308e1f9d196fc069f0c75d9c74cfaad851e418cc704f4/scikit_build-0.17.6-py3-none-any.whl.metadata
Using cached scikit_build-0.17.6-py3-none-any.whl.metadata (14 kB)
Collecting setuptools==59.2.0
Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
Collecting distro (from scikit-build>=0.14.0)
Using cached distro-1.8.0-py3-none-any.whl (20 kB)
Collecting packaging (from scikit-build>=0.14.0)
Obtaining dependency information for packaging from https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl.metadata
Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting wheel>=0.32.0 (from scikit-build>=0.14.0)
Obtaining dependency information for wheel>=0.32.0 from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata
Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
Using cached cmake-3.27.6-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (47.4 MB)
Using cached pip-23.2.1-py3-none-any.whl (2.1 MB)
Using cached scikit_build-0.17.6-py3-none-any.whl (84 kB)
Using cached wheel-0.41.2-py3-none-any.whl (64 kB)
Using cached packaging-23.2-py3-none-any.whl (53 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (pyproject.toml): started
Building wheel for numpy (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [186 lines of output]
setup.py:66: RuntimeWarning: NumPy 1.22.2 may not yet support Python 3.11.
warnings.warn(
Running from numpy source directory.
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_philox.pyx
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_sfc64.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/mtrand.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_common.pyx
Cythonizing sources
INFO: blas_opt_info:
INFO: blas_armpl_info:
INFO: customize UnixCCompiler
INFO: libraries armpl_lp64_mp not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: blas_mkl_info:
INFO: libraries mkl_rt not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: blis_info:
INFO: libraries blis not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_info:
INFO: libraries openblas not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: accelerate_info:
INFO: libraries accelerate not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: Library accelerate was not found. Ignoring
INFO: libraries veclib not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: Library veclib was not found. Ignoring
INFO: FOUND:
INFO: extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
INFO:
INFO: FOUND:
INFO: extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
INFO:
svnversion: error: The subversion command line tools are no longer provided by Xcode.
non-existing path in 'numpy/distutils': 'site.cfg'
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: libraries armpl_lp64_mp not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO: libraries mkl_rt not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: libraries openblas not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO: libraries openblas,lapack not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: flame_info:
INFO: libraries flame not found in ['/Users/hossein/PycharmProjects/HandTracking/venv/lib', '/usr/local/lib', '/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: FOUND:
INFO: extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
INFO:
Warning: attempted relative import with no known parent package
/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building py_modules sources
creating build
creating build/src.macosx-10.9-universal2-3.11
creating build/src.macosx-10.9-universal2-3.11/numpy
creating build/src.macosx-10.9-universal2-3.11/numpy/distutils
INFO: building library "npymath" sources
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
WARN: Could not locate executable nagfor
WARN: Could not locate executable f90
WARN: Could not locate executable f77
WARN: Could not locate executable xlf90
WARN: Could not locate executable xlf
WARN: Could not locate executable ifort
WARN: Could not locate executable ifc
WARN: Could not locate executable g77
WARN: Could not locate executable g95
WARN: Could not locate executable pgfortran
WARN: don't know how to compile Fortran code on platform 'posix'
creating build/src.macosx-10.9-universal2-3.11/numpy/core
creating build/src.macosx-10.9-universal2-3.11/numpy/core/src
creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath
INFO: conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_internal.h
INFO: adding 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath' to include_dirs.
INFO: conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/ieee754.c
INFO: conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_complex.c
INFO: None - nothing done with h_files = ['build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_internal.h']
INFO: building library "npyrandom" sources
INFO: building extension "numpy.core._multiarray_tests" sources
creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray
INFO: conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/_multiarray_tests.c
INFO: building extension "numpy.core._multiarray_umath" sources
Traceback (most recent call last):
File "/Users/hossein/PycharmProjects/HandTracking/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/hossein/PycharmProjects/HandTracking/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hossein/PycharmProjects/HandTracking/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 268, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 461, in <module>
setup_package()
File "setup.py", line 453, in setup_package
setup(**metadata)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
dist.run_commands()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/command/build.py", line 61, in run
old_build.run(self)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-build-env-kv09056g/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/command/build_src.py", line 144, in run
self.build_sources()
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/command/build_src.py", line 161, in build_sources
self.build_extension_sources(ext)
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/command/build_src.py", line 318, in build_extension_sources
sources = self.generate_sources(sources, ext)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/distutils/command/build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/core/setup.py", line 456, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/core/setup.py", line 50, in check_types
out = check_types(*a, **kw)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jc/nhnv1p4x36v7h99g3w58c17w0000gn/T/pip-install-uj3q4qvq/numpy_69bc37f504ed4f51b8d81ce79018242a/numpy/core/setup.py", line 311, in check_types
raise SystemError(
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
consider installing python3-dev or python3-devel using yum and update setuptools with pip and setuptools wheel ,it worked for me with opencv-python-headless when it cant build wheel
I'm having this same issue trying to build a wheel for openCV on my raspberry pi 3. I installed dnf so I could do what you said, Using didn't work, because it said that there were no enabled repositories in /etc/yum/repos.v or /etc/yum.repos.v . What commands would you use to update your setuptools and wheel with pip? Should I use pip3 since the program is for python3?
I apologize, I am fairly new to this and taking over someone else's project so there has been a lot of unknown variables. Thank you for the help!