Open tdnzr opened 1 year ago
Related suggestion: MS Store installs Python to a fixed location, so maybe Flow Launcher could automatically query that location and ask whether it should use that installation.
The way Windows handles Store apps might not make this possible from my experience. I'll keep looking for a solution and would love if anyone more knowledgeable can correct me if I'm wrong.
I'm not sure if you're referring to the initial bug report, or to my suggestion in the separate comment. If it's the former, as I mentioned there's a workaround which works just fine, i.e. I'm currently successfully using Python extensions with this MS Store Python installation.
It's just weird how Flow Launcher's Select dialog doesn't accept the same pythonw.exe file which is accepted by manually entering the path C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\pythonw.exe
, and separately that the (supposedly identical) path %LOCALAPPDATA%\Microsoft\WindowsApps\pythonw.exe
somehow does not work.
By the way, I found this recent Stack Overflow thread to be a good partial overview of the weird way the MS Store package of Python works. And here the Python docs on the Microsoft Store Package list Known Issues of this package.
EDIT: And this Stack Overflow answer (from 2019, so maybe no longer correct) explains why one can't directly select pythonw.exe in "C:\Program Files\WindowsApps", namely due to permissions issues.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I don't know how to remove the "stale" label. So here's a comment to indicate that, as far as I can tell, the issue still persists.
I guess that's because path inputbox doesn't respect environment variables.
\AppData\Local\Microsoft\WindowsApps\pythonw.exe
Is it your EXACT input to the input box?
Apologies. The path in my original post, albeit not in my comment, was meant to read as <user>\AppData\etc.
. But because I didn't mark the text as Code, Github treated the <user>
part as a tag and didn't display it. I've edited both. So the full input is C:\Users\<my username>\AppData\Local\Microsoft\WindowsApps\pythonw.exe
(which worked when typed, but not when using the Select dialogue) vs. the equivalent %LOCALAPPDATA%\Microsoft\WindowsApps\pythonw.exe
(which did not even work when typed).
No need to apologize. I was thinking how could we take a path without a drive.
LOCALAPPDATA is not working because we are not expanding environment variables. It can be fixed.
Related suggestion: MS Store installs Python to a fixed location, so maybe Flow Launcher could automatically query that location and ask whether it should use that installation.
@Garulf is it possible or can we just detect PATH ENV (I guess it's in PATH)? How do we detect python now?
We don't do any form of automatic detection currently. We only prompt the user if they'd like to have Flow Launcher install embedded Python if a python plugin is detected.
It would be nice to auto detect via path (usually it's in path but not always). This may lead to some broken plugins that rely on Python 3.8 though.
Checks
Problem Description
I installed Python 3.11 on Windows 11 via MS Store, then tried to add it to my Python Path in Flow Launcher; several attempts caused errors, until I finally found a workaround.
To Reproduce
C:\Users\<user>\AppData\Local\Microsoft\WindowsApps
, then select pythonw.exeAlternatively:
\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\
, then select pythonw.exeWorkaround:
C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\pythonw.exe
Side note to this workaround: entering the path "
%LOCALAPPDATA%\Microsoft\WindowsApps\pythonw.exe
" somehow does not work; on restart, Flow Launcher thinks no Python path is set and asks me to set a Python path via the dialog from step 1, which does not work.Screenshots
No response
Flow Launcher Version
1.14.0
Windows Build Number
10.0.22621.1265
Error Log
No response