admin管理员组

文章数量:1125904

When I try importing opencv on vscode it says 'no module found', when I try doing

pip install opencv2 

it says requirement already satisfied. I am a little confused on what to do, additionally, I had already downloaded opencv2 on my terminal.

I tried downloading within the vscode terminal rather than the windows one but it still doesnt work.

When I try importing opencv on vscode it says 'no module found', when I try doing

pip install opencv2 

it says requirement already satisfied. I am a little confused on what to do, additionally, I had already downloaded opencv2 on my terminal.

I tried downloading within the vscode terminal rather than the windows one but it still doesnt work.

Share Improve this question asked yesterday Krithik TamilselvanKrithik Tamilselvan 1 New contributor Krithik Tamilselvan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

2 Answers 2

Reset to default 0

If you want to use opencv in python try installation with this command

pip install opencv-python`

If you are using Run Code button to run the script than you need to select the interpreter. You can select interpreter from the status bar at the bottom of Vs Code. Or try to run the file using terminal.

python your_file_name.py

Try running your imports or code within a virtual environment

check out docs: https://docs.python.org/3/tutorial/venv.html

本文标签: pythonOpencv not recognized in vscode even though I downloaded in terminalStack Overflow