question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception has occurred: ModuleNotFoundError No module named 'cv2'

See original GitHub issue

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’

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidKutucommented, Apr 28, 2020

Thank you for uploading that image, and sorry if I go a bit basic with my questions, I want to be 100% sure to catch your issue. I have one more thing I’d like to ask you to do. Please upload the console log from the developer tools when the issue happens. (Help -> Toggle Developer Tools) We should be able to see the issue there.

0reactions
brettcannoncommented, Jun 18, 2020

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module cv2 when using OpenCV - Stack Overflow
However when i import cv2 module it displayed no module named cv2 error. Then i searched and find cv2.pyd files in my computer...
Read more >
ModuleNotFoundError: No module named 'cv2' in Python
The Python "ModuleNotFoundError: No module named 'cv2'" occurs when we forget to install the opencv-python module before importing it or install it in...
Read more >
ModuleNotFoundError: No module named 'cv2' in Python
Let's first reproduce this error, and then we will see how to resolve ModuleNotFoundError No module named 'cv2' . We will run cv2...
Read more >
Importerror No Module Named cv2 : How to Fix
importerror no module named cv2 error occurs when cv2 module is not properly installed or its path is not properly set or configured....
Read more >
no module named cv2 in Python? - EasyTweaks.com
You might have encountered this error in PyCharm, VS Code, Spyder or any other Python development environment. Why Python shows the modulenotfound error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found