当前位置:网站首页>AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘
AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘
2022-08-09 04:14:00 【「 25' h 」】
安装deepforest后,opencv-python导入import cv2显示以下错误
D:\code_management\pythonProject是我的项目路径
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "D:\code_management\pythonProject\main.py", line 17, in <module>
import cv2
File "D:\code_management\pythonProject\venv\lib\site-packages\cv2\__init__.py", line 181, in <module>
bootstrap()
File "D:\code_management\pythonProject\venv\lib\site-packages\cv2\__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "D:\code_management\pythonProject\venv\lib\site-packages\cv2\__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\code_management\pythonProject\venv\lib\site-packages\cv2\gapi\__init__.py", line 290, in <module>
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
先卸载opencv,然后安装最新版本就行。
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip install opencv-contrib-python
pip install opencv-python
关于py包终端下载较慢,这个链接:https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python
安装时:
pip install 包名
对于所有的包通过以下方式下载·:https://pypi.tuna.tsinghua.edu.cn/simple/+python包名
边栏推荐
猜你喜欢

网络设置、ssh服务

5. Index optimization practice
![[Server data recovery] A case of data recovery when the Ext4 file system cannot be mounted and an error is reported after fsck](/img/65/f16bb466967993934719022145f78c.png)
[Server data recovery] A case of data recovery when the Ext4 file system cannot be mounted and an error is reported after fsck

2022年低压电工练习题及模拟考试

2022年安全员-A证特种作业证考试题库及在线模拟考试

Win11一键重装系统后如何使用自带的故障检测修复功能

容易混淆的指针知识点

HyperLynx(四)差分传输线模型

技术分享 | 使用 cURL 发送请求

『HarmonyOS』Page与AbilitySlice的生命周期
随机推荐
阿里云天池大赛赛题(机器学习)——工业蒸汽量预测(完整代码)
【 21 based texture (2, bump mapping theory) 】
《剑指offer》题解——week1(持续更新)
static成员及代码块
From brute force recursion to dynamic programming leetcode Question 62: Different paths
了解CV和RoboMaster视觉组(五)统计特征和global-based方法
记录一次腾讯实习投递经历(一)
岭回归和LASSO回归
2022高处安装、维护、拆除考试练习题及模拟考试
2022年起重机司机(限桥式起重机)考试题库及模拟考试
助力To B业务,这类企业端数据值得风控童鞋关注
阿里云天池大赛赛题(深度学习)——视频增强(完整代码)
3年半测试经验,20K我都没有,看来是时候跳槽了...
ffmpeg之H265解码
查询某时间段获得的积分总积分的大小进行排序
MySQL:redo log日志——笔记自用
别跟客户扯细节
电脑重装系统如何在 Win11查看显卡型号信息
给一时兴起想要学习 “ 测试 ” 的同学的几条建议.....
5.索引优化实战