当前位置:   article > 正文

Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly_error: could not build wheels for opencv-python wh

error: could not build wheels for opencv-python which use pep 517 and cannot

1. case重现

笔者是python环境下安装albumentations出现的,该库经常用于图像增强,在cv领域有很大的知名度。在使用下边的命令进行安装后

pip install albumentations
  • 1

就报了ERROR:Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly

2. 原因及解决方案

albumentations库依赖opencv,在直接使用pip命令安装时,albumentations会默认采用opencv-python-headless作为opencv的默认依赖进行安装,由于opencv系列有多个版本,所以我们可以选择绕开,将albumentations依赖的opencv指向已经安装好的opencv-python库。输入下面命令即可:

pip install albumentations --no-binary qudida,albumentations
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/84714
推荐阅读
相关标签
  

闽ICP备14008679号