All my code was running fine until I ran a Windows update and all of my imported libraries such as NumPy and API’s like OpenAI are now returning errors.
I already tried:
- restarting again
- rerunning pip installs
- reinstalling python to latest version
errors:
Import "numpy" could not be resolved
Import "openai" could not be resolved
details: Python 3.10.10 on win32
Edit: I ran it in windows Powershell and it worked fine. My paths are fine. I think it is a problem with VSCode.
Please help thank you.
2
Answers
Try to uninstall a Windows Update.
Go to settings > Windows update > Update History > uninstall updates.
Try this or Check environment variables path.
This is the reminder provided by intellisense of Pylance or Pylint.
You have to provided the error report after you running the Python file.
According to the reminder, you may choose the correct python interpreter. You can use shortcuts "Ctrl+Shift+P" and type "Python: Select Python Interpreter" to choose the correct interpreter which contains these two packages.