unlessplus 2022-11-06 21:48 采纳率: 100%
浏览 111
已结题

opencv-python>=4.1.2 not found 报错处理

在跑yolov5s之前出现这个opencv-python的问题

github: skipping check (not a git repository)
requirements: opencv-python>=4.1.2 not found and is required by YOLOv5, attempting auto-update...
ERROR: Invalid requirement: "'opencv-python"
Traceback (most recent call last):
File "D:\yolov5-5.0\utils\general.py", line 110, in check_requirements
pkg.require(r)
File "D:\anaconda\envs\pytorch\lib\site-packages\pkg_resources_init.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
File "D:\anaconda\envs\pytorch\lib\site-packages\pkg_resources_init
.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'opencv-python>=4.1.2' distribution was not found and is required by the application**

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\yolov5-5.0\train.py", line 500, in
check_requirements()
File "D:\yolov5-5.0\utils\general.py", line 114, in check_requirements
print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode())
File "D:\anaconda\envs\pytorch\lib\subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "D:\anaconda\envs\pytorch\lib\subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'pip install 'opencv-python>=4.1.2'' returned non-zero exit status 1.

但是我的pycharm里面显示的是我的版本是4.5.5

img

这个怎么解决呀

  • 写回答

7条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 系统已结题 11月15日
      • 已采纳回答 11月7日
      • 创建了问题 11月6日

      悬赏问题

      • ¥15 vs创建SQL Server数据库时出现“系统找不到指定的路径”
      • ¥15 网页超时时间设置失效
      • ¥15 有关绿色信贷毕业论文的问题
      • ¥30 关于#机器人#的问题,如何解决?
      • ¥15 求MATLAB函数ScalarLayerDisplay的代码
      • ¥15 安卓如何自动执行检测到的NFC标签,无需再点确认
      • ¥15 pyHM库mouse模块的ValueError错误
      • ¥15 python opencv 摄像头 传感器
      • ¥30 eMMC&Android&C&Linux
      • ¥15 uniapp ios恢复购买