当前位置:网站首页>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包名
边栏推荐
- “error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
- etcd学习笔记 - 入门
- 器件可靠性与温度的关系
- NanoDet代码逐行精读与修改(二)FPN/PAN
- 软件质效领航者 | 优秀案例•东风集团DevOps改革项目
- 2022高处安装、维护、拆除考试练习题及模拟考试
- XJTUSE专业课与实验指南
- 了解CV和RoboMaster视觉组(五)统计特征和global-based方法
- 2022R1快开门式压力容器操作考试模拟100题及在线模拟考试
- 给一时兴起想要学习 “ 测试 ” 的同学的几条建议.....
猜你喜欢
随机推荐
松柏集(夜未央)
31 基本统计概念
UI中级操作(倾斜和雷达效果)
新一代CMDB构建方法,是能够给企业带来收益的
OpenCV相机标定完全指南(有手就行)
Poly1CrossEntropyLoss的pytorch实现
【周赛复盘】力扣第 305 场单周赛
查询某时间段获得的积分总积分的大小进行排序
别跟客户扯细节
OpenMLDB + Jupyter Notebook:快速搭建机器学习应用
Query the size of the total points obtained in a certain time period to sort
发明时代,「幂集创新」事关你我
337. 打家劫舍 III
了解CV和RoboMaster视觉组(五)local-distribution汇聚方法
松柏集(云衣裳)
软件质效领航者 | 优秀案例•东风集团DevOps改革项目
自动化测试-图片中添加文字注释,添加到allure测试报告中
阿里云天池大赛赛题(机器学习)——工业蒸汽量预测(完整代码)
给电脑重装系统后修改远程桌面端口的方法
FFmpeg编译支持x264/openH264/dash