Skip to content

Exception has occurred: ModuleNotFoundError No module named 'cv2' #11410

@mohammadsaleh40

Description

@mohammadsaleh40

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "pythonPath": "${config:python.pythonPath}",
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        }
    ]
}

main code

import cv2
print(cv2.__version__)

i try Debug this code in vs code but say : Exception has occurred: ModuleNotFoundError
No module named 'cv2'

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions