zoukankan      html  css  js  c++  java
  • 问题记录 | PyLint not recognizing cv2 members

    问题记录 | PyLint not recognizing cv2 members

    VScode中安装了pylint,总是提示cv2的一些成员函数找不到,
    如这样的问题:
    Module 'cv2' has no 'cvtColor' member
    Module 'cv2' has no 'imread' member
    类似Module 'cv2' has no '*' member
    要我from cv2 import *,可是这终究不是办法。
    python中的opencv是通过以下命令安装的
    pip install opencv-python

    问题答案:

    https://stackoverflow.com/questions/50612169/pylint-not-recognizing-cv2-members

    pylint --generate-rcfile > .pylintrc

    生成了.pylintrc文件

    # A comma-separated list of package or module names from where C extensions may
    # be loaded. Extensions are loading into the active Python interpreter and may
    # run arbitrary code.
    extension-pkg-whitelist=
    

    然后在.pylintrc文件中加入cv2

    # A comma-separated list of package or module names from where C extensions may
    # be loaded. Extensions are loading into the active Python interpreter and may
    # run arbitrary code.
    extension-pkg-whitelist=cv2
    
  • 相关阅读:
    html+css动态篇
    html+css定位篇
    首页的css
    display详细说明
    html+css 布局篇
    html+css杂记
    JS与ES的关系
    H5本地存储
    JavaScript面向对象
    JavaScript执行上下文
  • 原文地址:https://www.cnblogs.com/ManWingloeng/p/10758418.html
Copyright © 2011-2022 走看看