I started using venvs on Visual Studio Code, and when I am trying to use pandas, by import pandas
it gives me this error
"Import "pandas" could not be resolved from source"
So I tried to use ctrl+shift+p
to change python interpreter in vscode, I get this error
"Command Python resulted in an error (comand 'python.setInterpreter' not found).
For me, shifting from restricted mode to trusted window mode worked.
Just click on the restricted window on the bottom and just select "Trust" in the pop up window.
https://code.visualstudio.com/docs/editor/workspace-trust#_extensions
In my case, I solve it by clicking the "Extensions" button in the left sidebar of VSCode and "Reload" python. (which will show a blue reload button in the lower left corner of Python's block, just click it)
It works for me!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With