Pylance (ReportMissingImport) in Vs code

34 Views Asked by At

I have a problem with python on vs code, after installing numpy and matplotlib in venv, and the environment is activated, with all dependencies listed when i run pip list in cmd,

I have created another venv to resolve problem still no way, I need assistance

numpy not recognized

output error

1

There are 1 best solutions below

0
Luis E. Martinez On

In your bottom vs code bar there should be a python word followed by the version you would be using, if you click this, a pop up will appear asking what Python interpreter you would like to use. vscode bottom bar

Try to look for your venv interpreter, select it.

Select Python interpreter pop-up

And vs code will now detect your dependencies correctly. It will create a file named settings.json in a new directory .vscode inside your project. This should (in my opinion) not be commited.