I was forced to use WSL on Windows 10 to install the Python library Cartopy on my Windows machine correctly. It is way easier in a Linux-distribution, so I chose Ubuntu 20.04 WSL2.
As a consequence, I created a virtual Python environment via WSL in my project folder via python -m venv linux-venv.
The problem is now that all binaries/executables were compiled for the WSL-distribution and are thus not selectable from VS Code started from within Windows 10.
Consequently, I installed VS Code on WSL and started it from there.
My hope was that I can then manually select the right interpreter path linux-venv/bin/python from my project's root directory.
Unfortunately, it does not work either, even though I'm doing this from VS Code running on WSL:
Clicking on my desired interpreter linux-venv/bin/python, the following error message is displayed:
If I try to "browse to my desired executable" instead, they are not displayed since solely ".exe" - file extensions are allowed:
Next, I can solely browse ".exe" - files, wherefore I cannot select the UNIX-compiled executables.
Conclusion:
It does not seem possible at the moment to select a UNIX-compiled interpreter in VS Code properly on a Windows 10 - machine, not even using WSL.
Since the aforementioned Python library Cartopy solely works well on UNIX-systems, I need to install my virtual environment from WSL.
In order to continue with my project, I would need to be able to select the UNIX-compiled interpreter, but I cannot.



