python - 诗歌安装 opencv-contrib-python 失败
问题描述
我正在使用诗歌来安装依赖项以及在我的 Windows pc 和树莓派上运行的项目。
我在两台机器上都使用 python 3.9.6 和诗歌 1.1.8。
诗歌安装作品只能在电脑上找到。
在 pi 上安装诗歌失败,出现以下错误:
软件包操作:1 次安装、0 次更新、0 次删除
• Installing opencv-contrib-python (4.5.3.56): Failed
EnvCommandError
Command ['/home/pi/.cache/pypoetry/virtualenvs/headset-v3RTQD8O-py3.9/bin/pip', 'install', '--no-deps', 'file:///home/pi/.cache/pypoetry/artifacts/7e/28/b6/71f401b246599f739692821b247f4fd4e36074b02a183e5832adb33a9a/opencv-contrib-python-4.5.3.56.tar.gz'] errored with the following return code 1, and output:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/.cache/pypoetry/artifacts/7e/28/b6/71f401b246599f739692821b247f4fd4e36074b02a183e5832adb33a9a/opencv-contrib-python-4.5.3.56.tar.gz
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Building wheels for collected packages: opencv-contrib-python
Building wheel for opencv-contrib-python (PEP 517): started
Building wheel for opencv-contrib-python (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/pi/.cache/pypoetry/virtualenvs/headset-v3RTQD8O-py3.9/bin/python /home/pi/.cache/pypoetry/virtualenvs/headset-v3RTQD8O-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp2928ygzi
cwd: /tmp/pip-req-build-vtu3bx_r
Complete output (11 lines):
patching file opencv/3rdparty/openexr/IlmImf/ImfSystemSpecific.cpp
/tmp/pip-build-env-gtb6_i8l/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/pip-build-env-gtb6_i8l/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake)
File "/tmp/pip-build-env-gtb6_i8l/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 564, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/tmp/pip-build-env-gtb6_i8l/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 95, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/tmp/pip-build-env-gtb6_i8l/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
raise SKBuildError(
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
at ~/.poetry/lib/poetry/utils/env.py:1101 in _run
1097│ output = subprocess.check_output(
1098│ cmd, stderr=subprocess.STDOUT, **kwargs
1099│ )
1100│ except CalledProcessError as e:
→ 1101│ raise EnvCommandError(e, input=input_)
1102│
1103│ return decode(output)
1104│
1105│ def execute(self, bin, *args, **kwargs):
我以前在 pi 上安装了 opencv4.4.0,但我通过回到 opencv 文件夹并运行来摆脱它,sudo make install
然后sudo make uninstall
我不确定还有什么可能导致失败,有什么想法吗?
解决方案
推荐阅读
- javascript - 在具有“activeTab”权限的活动选项卡中执行脚本时,Chrome Web 扩展程序出错
- javascript - 我们如何在 javascript 的函数内部理解和创建这个参数?
- sql-server - 如何解决“选择失败,因为以下 SET 选项的设置不正确:'ANSI_PADDING'。”错误
- ios - 在我发布的 iOS 应用程序中,每天将数据添加到 tableview 的最佳方法是什么?
- python - 如何使用 itertools 提取 groupby 值?
- apache-camel - 消息路由器用例
- android - 如何将 Android 的导航架构组件与 Bazel 一起使用?
- linux - 如何在不使用 Intellij 的情况下在 Linux centos 中运行黄瓜测试用例
- flutter - Dart/Flutter 中的依赖关系图?
- laravel - 如何在laravel中输入从YYYY-MM-DD到DD-MM-YYYY的日期