Windows Store Python causes crash on start
What were you trying to do?
Launch from a virtual environment
What steps did you take to trigger the issue?
- Install Python 3.8 from the Windows store
- Create a virtual environment
- Start mu
mu.config.DATA_DIR will be C:\Users\<user>\AppData\Local\python\mu
But, this an app execution alias, so the path is actually something like:
C:\\Users\\<user>\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\Local\\python\\mu\\
This only causes an issue when launching a subprocess, like when mu will create virtual environments, because Windows cannot apply the alias redirect to the subprocess.
Operating System Version
Windows 11
Mu Version
main (1.1.1)
Other Info
No response
Editor Log
No response
Related: https://github.com/platformdirs/platformdirs/issues/90
I also needed to do this to get mu-editor running with windows store python (apart from applying the patch) https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later