当前位置:网站首页>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包名
边栏推荐
- npm package.json
- 软件质效领航者 | 优秀案例•国金证券DevOps建设项目
- 新一代CMDB构建方法,是能够给企业带来收益的
- 关于微软2022/2023秋招内推的几句
- 自动化测试的生命周期是什么?
- 【二叉树】重建二叉树
- [Server data recovery] A case of data recovery when the Ext4 file system cannot be mounted and an error is reported after fsck
- OpenCV相机标定完全指南(有手就行)
- 网络设置、ssh服务
- OpenMLDB + Jupyter Notebook:快速搭建机器学习应用
猜你喜欢
随机推荐
Swift3.0 sets the background color and text color of the status bar
Grid 布局介绍
XJTUSE专业课与实验指南
医学影像分割系统综述Data preparation for artificial intelligence in medical imaging: A comprehensive guide ...
串扰与防护
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
阿里云天池大赛赛题(机器学习)——O2O优惠券预测(完整代码)
阿里云天池大赛赛题(机器学习)——阿里云安全恶意程序检测(完整代码)
了解CV和RoboMaster视觉组(五)local-distribution汇聚方法
One Pass 1258 - Digital Pyramid (Dynamic Programming)
极速理解ML交叉验证
了解CV和RoboMaster视觉组(五)运动建模与预测
5.索引优化实战
阿里云天池大赛赛题(机器学习)——天猫用户重复购买预测(完整代码)
月报总结|Moonbeam 7月份大事一览
NanoDet代码逐行精读与修改(五.2)计算Loss
笔记本电脑重装系统后开机蓝屏要怎么办
wift3.0设置导航栏,标题,字体,item颜色和字体大小
JVM学习——1——虚拟机基础概念
技术分享 | 使用 cURL 发送请求









