You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should work as-is with pyright and mypy, but for Pylance you'll have to remove the bundled stubs every time you update the extension. It can be found at: %HOMEPATH%\.vscode\extensions\ms-python.vscode-pylance-<VERSION>\dist\bundled\stubs\cv2-stubs (where <VERSION> is your current Pylance version).
Activity
Avasam commentedon Jun 13, 2023
Given that opencv can now generates python stubs and opencv-python has been updated to ship them, you can try the in-development version using
pip install git+https://github.com/opencv/opencv-python.git.You can set the appropriate environment variables first if you'd like to install a specific package (like headless, contrib or healdless-contrib):
It should work as-is with pyright and mypy, but for Pylance you'll have to remove the bundled stubs every time you update the extension. It can be found at:
%HOMEPATH%\.vscode\extensions\ms-python.vscode-pylance-<VERSION>\dist\bundled\stubs\cv2-stubs(where<VERSION>is your current Pylance version).If the issue persists, you can raise it upstream.