简体   繁体   English

IDE 中的自动完成功能不适用于 cv2

[英]Autocompletions in IDEs don't work for cv2

I started to work with intel RealSense devices which uses pyrealsense2 python library.我开始使用使用 pyrealsense2 python 库的英特尔实感设备。 After installing that library with a great effort on Ubuntu, I also install opencv and numpy libraries.在 Ubuntu 上努力安装该库后,我还安装了 opencv 和 numpy 库。 Since these libraries contain many many functions, autocompletion plays a big role.由于这些库包含许多功能,因此自动完成起着重要作用。

However, it does not work for me with some libraries.但是,它不适用于某些库。 For example, in VSCode and PyCharm, autocompletion for numpy library works well but for cv2 & pyrealsense2 it does not.例如,在 VSCode 和 PyCharm 中,numpy 库的自动补全效果很好,但对于 cv2 和 pyrealsense2 则不行。

numpy was installed with pip, pyrealsense2 was installed from source and cv2 was installed with both pip and PyCharm packages. numpy was installed with pip, pyrealsense2 was installed from source and cv2 was installed with both pip and PyCharm packages.

I searched it for a long time but did not find a useful answer.我搜索了很长时间,但没有找到有用的答案。 If you want additional information don't hesitate to ask, please.如果您想了解更多信息,请随时询问。

Not sure about Pycharm, but for VSCode, you can select the interpreter path, and if you're using the correct Python environment that has the library, it will surely show up不确定 Pycharm,但是对于 VSCode,您可以 select 解释器路径,如果您使用正确的 Python 环境,它肯定会显示库

cv2 autocompletes cv2 自动完成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM