AirtestProject / Airtest

UI Automation Framework for Games and Apps
http://airtest.netease.com/
Apache License 2.0
8.31k stars 1.31k forks source link

关于opencv-contrib-python版本问题,"There is no SIFT module in your OpenCV environment!" #493

Open SHUJIAN01 opened 5 years ago

SHUJIAN01 commented 5 years ago

(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。否则直接关闭。)

(重要!问题分类)

描述问题bug (简洁清晰得概括一下遇到的问题是什么。或者是报错的traceback信息。)

Linux执行airtest脚本报"There is no SIFT module in your OpenCV environment!"

根据https://github.com/AirtestProject/Airtest/issues/377,想安装3.2.0.7的opencv-contrib-python,有的Linux能安装上,有的却报"ERROR: airtest 1.0.24 has requirement opencv-contrib-python==3.4.2.17, but you'll have opencv-contrib-python 3.2.0.7 which is incompatible."

能安装上opencv-contrib-python==3.2.0.7的环境的确是不报"There is no SIFT module in your OpenCV environment!"了。

为什么有的环境安装opencv-contrib-python==3.2.0.7却报错? (python2和python3都不行)

(在这里粘贴traceback或其他报错信息)

Collecting opencv-contrib-python==3.2.0.7 Downloading https://files.pythonhosted.org/packages/34/70/323020070a925c75d53042923265807c7915181921e0484911249f1d3336/opencv_contrib_python-3.2.0.7-cp27-cp27m-win_amd64.whl (28.4MB) |████████████████████████████████| 28.4MB 7.3MB/s Requirement already satisfied: numpy>=1.11.1 in c:\python27\lib\site-packages (from opencv-contrib-python==3.2.0.7) (1.16.4) ERROR: airtest 1.0.24 has requirement opencv-contrib-python==3.4.2.17, but you'll have opencv-contrib-python 3.2.0.7 which is incompatible. Installing collected packages: opencv-contrib-python Successfully installed opencv-contrib-python-3.2.0.7

相关截图 (贴出遇到问题时的截图内容,如果有的话) (在AirtestIDE里产生的图像和设备相关的问题,请贴一些AirtestIDE控制台黑窗口相关报错信息)

复现步骤

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

预期效果 (预期想要得到什么、见到什么)

python 版本: python2.7

airtest 版本: 1.0.24

airtest版本通过pip freeze可以命令可以查到

设备:

其他相关环境信息 (其他运行环境,例如在linux ubuntu16.04上运行异常,在windows上正常。) linux ubuntu16.04运行异常,windows使用opencv-contrib-python==3.4.2.17运行正常,Linux和windows安装opencv-contrib-python==3.2.0.7都有问题。

yimelia commented 5 years ago

linux先暂时不看,我们先解决windows下无法使用的问题,可能是系统中缺失了一些dll文件,你可以搜一下你的windows目录中有没有以下几个dll,如果没有的话,可以到网上搜索一下把缺失的dll装上(重点关注一下IEShims.dll和api-ms-win-downlevel-shlwapi-l1-1-0.dll) image

参考:https://blog.csdn.net/cskywit/article/details/81513066