我得到一个错误(如下所示)当我运行我的程序。有人知道怎么解决吗?
#Display the resulting frame cv2.imshow('frame',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break #When everything done, release the capture cap.release() cv2.destroyAllWindows()
8yparm6h1#
像以前一样卸载其他文件:
pip3 uninstall opencv-python
pip3 uninstall opencv-contrib-python
pip3 uninstall opencv-contrib-python-headless
pip3 install opencv-python==4.4.0.46
pip3 install opencv-contrib-python==4.4.0.46
rjzwgtxy2#
我也犯了同样的错误。重新安装opencv-python并不能解决任何问题。发现文件夹中缺少两个文件:
opencv-python
age_net.caffemodel
gender_net.caffemodel
在项目文件夹中添加这两个文件可解决此问题。
2条答案
按热度按时间8yparm6h1#
像以前一样卸载其他文件:
pip3 uninstall opencv-python
pip3 uninstall opencv-contrib-python
pip3 uninstall opencv-contrib-python-headless
然后只安装前两个:
pip3 install opencv-python==4.4.0.46
pip3 install opencv-contrib-python==4.4.0.46
这可以进一步帮助您:OpenCV "The function is not implemented. Rebuild the library with Windows"
rjzwgtxy2#
我也犯了同样的错误。重新安装
opencv-python
并不能解决任何问题。发现文件夹中缺少两个文件:
age_net.caffemodel
gender_net.caffemodel
在项目文件夹中添加这两个文件可解决此问题。