For me this problem resolved when I installed two extensions from VScode
Jupyter Notebook Renderers v1.3.0
72.9M | 3
Renderers for Jupyter Notebooks (with plotly, vega, gif, png, svg, jpeg and other such outputs)
This publisher has verified ownership of microsoft.com
Python v2025.10.0
175.6M | 4
Python language support with extension access points for IntelliSense (Pylance), Debugging (Python Debugger), linting, formatting, refactoring, unit tests, and more.
This publisher has verified ownership of microsoft.com
After installing these two extension from windows VScode (left side menu icon). the option for "Python: Select interpreter" showed up as on option on pressing Ctrl+Shift+P. Otherwise it did not show up.
Once this option showed up it was easy. You just select the Ubuntu path for your virtual environment/bin directory for Python (python3 in my case).