You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All paths opened in Windows applications are relative to C:\Windows instead of the WSL working directory, preventing e.g. Python.exe from launching a Python script relative to the CWD.
The issue still exists, even after:
Re-installing WSL
Updating WSL to a pre-release version
Installing a different WSL distribution (Ubuntu 2024.04)
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
This is interesting. I can't reproduce the issue so I wonder which python.exe. Which python.exe do you have installed ?
What's the output of which python.exe inside WSL ?
To clarify, this does not only impact Python. Any Windows application trying to open files or directories in WSL seems to be affected. Running Python scripts stored in WSL with Windows Python is just a common use-case for me.
The Python version I currently use is Python 3.12.6.
Windows Version
Microsoft Windows [Version 10.0.22631.4602]
WSL Version
2.3.26.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.167.4-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04
Other Software
IntelliJ IDEA 2024.3.1.1 (Community Edition)
Python 3.12.6
Repro Steps
See #12373 for the original issue.
Launch a Windows application with a path relative to a path in the WSL filesystem from WSL, e.g.:
Using a fully qualified WSL path (e.g.
python.exe \\\\wsl$\\Ubuntu\\home\\seppe\\gps.py
) works as expected.The original issue was automatically closed due to lack of "author feedback" despite specifying what feedback is missing.
Expected Behavior
The windows applications should be able to to access files and directories on the WSL filesystem. See https://learn.microsoft.com/en-us/windows/wsl/filesystems#file-storage-and-performance-across-file-systems.
Actual Behavior
All paths opened in Windows applications are relative to C:\Windows instead of the WSL working directory, preventing e.g. Python.exe from launching a Python script relative to the CWD.
The issue still exists, even after:
Possibly related to https://stackoverflow.com/questions/66392318/can-no-longer-access-wsl2-files-from-windows-explorer-or-launch-windows-programs
Diagnostic Logs
Strace opening home directory with explorer.exe from WSL: https://gist.github.com/seppestas/d5898ac51bbb172b7f17e772aa6070a0
Strace of running a hello world Python script in WSL with Windows python: https://gist.github.com/seppestas/9244021a1e59a8054ffe5735f1d16f74
WSL logs, Python script was attempted to run WslLogs-2025-01-06_18-17-10.zip
The text was updated successfully, but these errors were encountered: