To be more precise, I am facing an issue with PDM. The error is: "Command 'pdm' not found..."
.
When I run WSL directly from the Windows Start menu, the issue does not occur. I am able to run pdm --version
, and the PATH variable '/home/melleo/.local/bin'
is there by default. It also works if I open the repository with .code.
However, if I open VS Code on my Windows and connect to WSL, it will be missing the path to '/home/melleo/.local/bin'
, and pdm --version
won’t work. The fix is to run export PATH="$PATH:/home/melleo/.local/bin"
. But after I reconnect to WSL in VS Code, it reverts back.
Edition Windows 10 Home
Version 22H2
OS build 19045.4651
WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.4651
Ubuntu, version: 2204.3.49.0
About VS Code:
Version: 1.91.1 (user setup)
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045