python的opencv错误The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon

这篇具有很好参考价值的文章主要介绍了python的opencv错误The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1、出现问题:

cv2.error: OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1274: error: (-2:Unspecified e
rror) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'

2、原因分析:

1、安装包问题,需要安装以下安装包

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

 文章来源地址https://www.toymoban.com/news/detail-838662.html

2、路径问题 ,相对路径和绝对路径都可以,参考如下:image=cv2.imread("D:\\01xiangmu\\43tesseract\\IMG\\01.png") 

以上均没问题,一看网上面均说的是这两种情况,均无法解决笔者问题,搞得笔者直接怀疑是不是安装包有问题,直接想下载源码编译,仍无法正常运行,笔者遇到了最棘手的问题,最后竟然发现是安装包冲突问题:

3、安装包冲突问题

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

笔者原先有opencv包,没有卸载干净,就安装opencv-contrib-python包和opencv-contrib-python-headless包,可能导致python识别错误,导致无法正常识别运行,出现上述问题。

但是笔者的opencv包竟然无法正常卸载,无论通过Pycham或者Anaconda环境房间pip uninstall、conda uninstall、conda remove 均无法卸载。。。。

最后直接到C:\ProgramData\Anaconda3\envs\pytorch中查找opencv,发现无法卸载,conda list却显示opencv的原因是C:\ProgramData\Anaconda3\envs\pytorch\conda-meta中的opencv残留,如下:

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

将其手动删除,conda list,发现已经不存在opencv。

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

同时,将base环境下的opencv包删除,直接搜索

 

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

删除干净后,再次安装

 the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

 然后pycham运行程序,

the function is not implemented. rebuild the library with windows, gtk+ 2.x,opencv,python,人工智能,计算机视觉

终于正常运行!

 

 

 

 

 

 

到了这里,关于python的opencv错误The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • cv2.imshow error: (-2:Unspecified error) The function is not implemented.问题解决

    在运行opencv的python代码时,调用cv2.imshow时报错,如下所示 cv2.imshow(opencv_title, out) cv2.error: OpenCV(4.5.5) D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp:1268: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Deb

    2024年02月16日
    浏览(42)
  • 【Unity细节】关于NotImplementedException: The method or operation is not implemented

    👨‍💻个人主页 :@元宇宙-秩沅 hallo 欢迎 点赞👍 收藏⭐ 留言📝 加关注✅! 本文由 秩沅 原创 收录于专栏 :unity细节和bug 中文翻译:代表没有实现操作或方法 对应代码块中不存在相应的方法,是API混淆了,检查一下对应类中有没有你想要的API 检查是否混淆了类中API,对

    2024年02月15日
    浏览(34)
  • 记录opencv的 QObject::moveToThread: Current thread(...) is not the object`s thread 错误

    这个错误主要是在qt库的加载上,在安装的opencv-python工具包下有个qt文件夹,这个文件夹里面的文件估计是要来加载qt的,要是这个里面的qt库的版本和pip install pyqt5所使用的qt库的版本一样估计是没什么问题,要是不一样。就会出现核心转移的错误。(这里为什么这么说,是因

    2024年02月12日
    浏览(31)
  • 使用vue/cli出现defineConfig is not function 错误

     原因是vue3语法,vue/cli版本太低不支持;需要升级vue/cli版本 然后使用  安装新的包或是升级  然后查询vue/cli的版本都没有变  npm list -g查看全局配置后,发现vue/cli安装在UsersAdministratorAppDataRoamingnpm目录  和我node配置的环境变量路径不同 D:nodenode_globalnode_modules 解决办法

    2024年02月16日
    浏览(31)
  • 前端date.locale is not a function错误解决办法

    在使用antd组件DatePicker时,修改数据之前做数据回显,但是在数据回显时总是会报一个错误:date.locale is not a function。经过一步步的排错,最终确定是使用antd中DatePicker(日期选择器)组件的问题,此时我只在表单中写了一个DatePicker组件,并在表单中进行了数据绑定 查阅了很

    2024年02月11日
    浏览(34)
  • 微信小程序错误-TypeError: this.setData is not a function

    微信小程序在与后台获取数据的时候遇到: TypeError: this.setData is not a function错误。 产生原因: 输出结果能输出,会产生警告,原因是this不能直接在请求的回调函数里写this, 解决方法:     在请求外声明一个变量,接收onload函数的this。  

    2024年02月16日
    浏览(36)
  • 解决错误:pip is configured with locations that require TLS/SSL,the ssl module in Python is not available

    解决错误:pip is configured with locations that require TLS/SSL,the ssl module in Python is not available。 pip安装包出现错误类似如下: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting protobuf=4.25.2 (fr

    2024年02月19日
    浏览(39)
  • ssh : The term ‘ssh‘ is not recognized as the name of a cmdlet, function, script file, or opera

    废了很长时间才解决这问腿。在PowerShell中输入ssh报: ssh : The term ‘ssh’ is not recognized as the name of a cmdlet, function, script file, or operable programssh:术语“ssh”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。 复盘一下是问题是因为装hightec,需要装java,配置java环境变量,

    2024年02月07日
    浏览(33)
  • 解决 “Function not implemented“, 为 arm64 架构宿主机重新构建 Nacos 镜像

    官方的 Nacos 镜像在 arm64 架构的系统上运行容器会出现 “Function not implemented” 的相关异常日志以致于容器内 Nacos 无法正常启动. 原因是官方镜像基于的 CentOS 7.x 的基础镜像版本并不支持 arm64 架构的系统. 其实 7.x 版本是有 arm64 支持的, 只是官方镜像并没有采用那个 platform (

    2024年02月08日
    浏览(36)
  • python selenium报错:Message: javascript error: arguments[0].click is not a function

      这是selenium比较常见的报错,所以记录一下解决方法,避免总是忘记。 代码示例: 分析原因 通过debug可以发现,click1并不是一个WebElement,而是一个list 解决方法: 所以把click1改成click1[0],就可以了    

    2024年02月15日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包