I am using the remote SSH option in VSCode to access a server, where I created a Python virtual environment.
The issue is that whenever I launch VSCode, it keeps showing the following error message:
However, when I click Select Python Interpreter, it shows me that my custom environment is indeed selected (the one marked as Current):
Additionally, I keep getting warnings that say:
Import "package_name" could not be resolved from sourcePylancereportMissingModuleSource whereas package_name (e.g. Pandas) is installed in env.
I added the following lines to my settings.json:
"python.pythonPath": "/path_of_my_home_dir/env/bin/python"
and
"python.analysis.extraPaths": [
"/path_of_my_home_dir/env/bin"
]
but it's still not recognizing the environment.
Note that my code runs properly. It's just that seeing these warnings is confusing.
Is there a way to fix this?

