cannot find reference for opencv functions in pycharm(在 pycharm 中找不到 opencv 函数的参考)
问题描述
我已经安装了 opencv-python 并且 .pyd 文件被添加到站点包和 DLL 中.该代码适用于图像.当我想阅读、显示、编写图像时,它可以工作.但我收到警告,在 init.py 中找不到函数的引用.因此,我无法使用自动完成功能.有人可以帮我吗?我在 pycharm 中使用 opencv 3.4.0 和 python 3.6.4.我在命令提示符下通过 pip 下载了 opencv.
I have opencv-python installed and the .pyd file is added in the site-packages and the DLLs. The code works with images. When I want to read, show, write an image it works. But I get a warning that the functions' references cannot be found in init.py . Due to this, I can not use the auto-complete feature. Could someone help me out? I am using opencv 3.4.0 and python 3.6.4 in pycharm. I downloaded opencv via pip in the command prompt.
推荐答案
问题是由 CV2 引起的,以及 init.py 是如何进行导入的.只需忽略应用程序将正常工作的警告.或者您可以使用
The problem is caused by CV2 and how init.py does the imports. Just ignore the warnings the app will work the same. Or you can do an import with alias like
import cv2.cv2 as cv2
如果您有警告,请按 Alt+Return 安装并修复它.现在您将在项目上看到自动完成功能并且没有其他警告(关于此).
If you have a warning on it press Alt+Return to install and fix it. Now you will have the autocomplete and no other warnings (about that) on the project.
这篇关于在 pycharm 中找不到 opencv 函数的参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 pycharm 中找不到 opencv 函数的参考


基础教程推荐
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01