Hi I found that the Python extension is not properly activated in the VS Code.
The variable names are not properly recognized (highlighted) as shown below
In addition, it does not prompt out the variable name for auto-completion.
But I think I have checked the auto-completion.
I tried version v2023.16.0 and v2024.2.1. Both do not work for me.
Python version: Python 3.8.18
OS version: Ubuntu 20.04.6 LTS (Focal Fossa)
Thanks a lot!!!
2
Answers
Finally resolved this by
pyrightconfig.json
file in the workspace.This was possible caused by not choosing python environment.
You can use shortcuts "Ctrl+Shift+P" and type "Python: Select Interpreter" to choose your python interpreter.
You could read document about python for more details.