当前位置:网站首页>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包名
边栏推荐
猜你喜欢
随机推荐
07.1 类的的补充
2分钟,带你走完企业经营分析全流程,更有通用分析框架直接套用
查询某时间段获得的积分总积分的大小进行排序
Talking about the process and how to create it
NanoDet代码逐行精读与修改(三)辅助训练模块AGM
单根k线图知识别以为自己都懂了
【数学】点积与叉积
07.1 Supplements to the class
技术分享 | 使用 cURL 发送请求
Crosstalk and Protection
软件质效领航者 | 优秀案例•东风集团DevOps改革项目
2022R1快开门式压力容器操作考试模拟100题及在线模拟考试
项目管理-挣值分析方法学习总结
月报总结|Moonbeam 7月份大事一览
容易混淆的指针知识点
了解CV和RoboMaster视觉组(五)滤波器、观测器和预测方法:维纳滤波器Wiener Filter,LMS
机器人工程师入门知识框架(思维导图)
理性预测,未来音视频开发前景将是这般光景
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
etcd学习笔记 - 入门









