beets icon indicating copy to clipboard operation
beets copied to clipboard

Detect Microsoft Store installation and display warning

Open jackwilsdon opened this issue 1 year ago • 2 comments

Proposed solution

We should detect whether Python is installed via the Microsoft Store and issue a warning if so. The warning should say something along the following lines:

Warning: your Python installation is from the Microsoft Store which restricts access to AppData. Please follow https://beets.readthedocs.io/en/stable/guides/main.html#installing-on-windows.

Objective

Microsoft Store installations of Python seem to be sandboxed which causes confusion (see #5466).

Goals

Avoid confusion when using Microsoft Store installation.

jackwilsdon avatar Oct 18 '24 10:10 jackwilsdon

To start with, we could potentially document this somewhere in the Windows / Installation docs?

snejus avatar Oct 18 '24 11:10 snejus

with this

$ python
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.exec_prefix

and detecting a path within this directory C:\Users\username\AppData\Local\Microsoft\WindowsApps\ we should be able to stop beets execution and advise user about options.

Will need some thoughts about config options and editing via beet config -e

arogl avatar Oct 18 '24 11:10 arogl