mu icon indicating copy to clipboard operation
mu copied to clipboard

Windows Store Python causes crash on start

Open tonybaloney opened this issue 3 years ago • 2 comments

What were you trying to do?

Launch from a virtual environment

What steps did you take to trigger the issue?

  1. Install Python 3.8 from the Windows store
  2. Create a virtual environment
  3. 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

tonybaloney avatar Jul 16 '22 13:07 tonybaloney

Related: https://github.com/platformdirs/platformdirs/issues/90

tonybaloney avatar Jul 16 '22 13:07 tonybaloney

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

Jeffrey04 avatar Jul 17 '22 08:07 Jeffrey04