簡體   English   中英

無法構建 opencv-contrib-python(在 Rasberry Pi 上)

[英]Failed to build opencv-contrib-python (On Rasberry Pi)

我正在嘗試在我的 Rasberry Pi 上安裝 OpenCV 但是當我運行以下命令時,我得到了一些錯誤。 命令:

pip install opencv-contrib-python

結果:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting opencv-contrib-python
  Using cached opencv-contrib-python-4.5.1.48.tar.gz (148.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.14.5 in ./.local/lib/python3.7/site-packages (from opencv-contrib-python) (1.19.5)
Building wheels for collected packages: opencv-contrib-python
  Building wheel for opencv-contrib-python (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3 /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp5g982u_t
       cwd: /tmp/pip-install-v1dx6hv5/opencv-contrib-python_85b21e0e2a604411afeb4dda9ea29270
  Complete output (12 lines):
  patching file opencv/3rdparty/openexr/IlmImf/ImfSystemSpecific.cpp
  /tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/cmake/data/bin/cmake: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/cmake/data/bin/cmake)
  /tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/cmake/data/bin/cmake: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/cmake/data/bin/cmake)
    File "/tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
      cmkr = cmaker.CMaker(cmake_executable)
    File "/tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/skbuild/cmaker.py", line 95, in __init__
      self.cmake_version = get_cmake_version(self.cmake_executable)
    File "/tmp/pip-build-env-eoujog_o/overlay/lib/python3.7/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
      "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
  Traceback (most recent call last):
  
  Problem with the CMake installation, aborting build. CMake executable is cmake
  ----------------------------------------
  ERROR: Failed building wheel for opencv-contrib-python
Failed to build opencv-contrib-python
ERROR: Could not build wheels for opencv-contrib-python which use PEP 517 and cannot be installed directly

我已經嘗試了以下來源,但似乎沒有任何幫助:

錯誤-不能-不能-建造-輪子-for-opencv-python-which-use-pep-517-and-cannot-be

Python OpenCV 安裝錯誤

opencv-contrib-python

如何安裝-python-opencv-on-raspberry-pi

python3 --version Python 3.5.3

pip3 --version pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

嘗試升級您的設置工具輪

pip install --upgrade pip setuptools wheel

然后再次安裝 opencv,

pip install opencv-contrib-python

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM