I am getting the following error while trying to import newly installed packages from pip:
Import "<package>" could not be resolved
Pylance(reportMissingImports)
After I restart VS Code, Pylance seems to then be able to recognise the package.
Is there any fix to this as it is very annoying?
This question will happen when Pylance doesn't detect the module immediately. You may Reload Window from Command Palette to refresh the current project.
If you are using VS Code, open the command pallet and run "Python: Restart Language Server"
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