When I work with VSCode inside WSL2 and run the Python: Launch Tensorboard command, it first asks
The package TensorBoard is required to launch a TensorBoard session. Would you like to install it?
Source: Python (Extension)
When I click Yes, it says
Could not install tensorboard. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment.
But what environment is that? I can run my python scripts and notebooks without problem. I typically use Miniconda as environment manager, but I doubt this has anything to do with it.
Running tensorboard --logdir=. --host localhost --port 8888 in the console works fine, but it is a bit inconvenient.
Here is the VSCode version:
Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19043
Addendum
I now realize that everything works if I am in a regular Python file. It just doesn't work in a ipynb notebook. This seems like a minor bug - the Python extension should use the notebook's environment if no other Python environment was specified. Or is there a reason not to?