From 3798ac5d02eb52c940d175f4c497a12a4b53fcd0 Mon Sep 17 00:00:00 2001 From: Andrew Rogl Date: Sat, 19 Oct 2024 12:24:30 +1000 Subject: [PATCH] Add a quick check for MST Store Python install --- beets/ui/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 39ef7d291..cf407d5c8 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -1858,6 +1858,14 @@ def main(args=None): """Run the main command-line interface for beets. Includes top-level exception handlers that print friendly error messages. """ + if "AppData\\Local\\Microsoft\\WindowsApps" in sys.exec_prefix: + log.error( + "error: beets is unable to use the Microsoft Store version of Python. Please install Python from python.org." + ) + log.error( + "error: More details can be found here https://beets.readthedocs.io/en/stable/guides/main.html" + ) + sys.exit(1) try: _raw_main(args) except UserError as exc: