Closed npavlinek closed 1 year ago
I just tried this:
python3
and the Microsoft Store openedpython3
again and got a Python shellWhat am I missing?
I used the official installer provided at python.org, which only installs python
.
I also tried your steps and there are at least two problems:
Vim's Python functionality has never been less popular. I doubt it shapes nearly as many Python installations as you think it does. Plus even if you do install it from python.org, there's no harm in also installing it from the Microsoft Store, best I can tell.
I think a viable approach that could work is changing the check of executable('python3')
to a match against exepath('python3')
. When my Windows machine was booted, I noticed that returned a rather specific value for the installation stub that we could probably reject. Show me your exepath('python3')
and maybe I can cook something up.
Here's the value: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.18.2691.0_x64__8wekyb3d8bbwe\AppInstallerPythonRedirector.exe
. Python is only installed from python.org.
Starting with Windows 10, Microsoft added Python aliases to the system, meaning you can type either
python.exe
orpython3.exe
in a Command Prompt and it'll redirect you to the Microsoft Store to download Python.When Python is installed on Windows only
python.exe
is created, there is nopython3.exe
even if Python 3 was installed, but there's still that Python 3 alias hanging around which causes a problem in the following code:python3.exe
will always be found as executable on Windows 10.Later in the file when this executable is used it of course doesn't work because it's bogus with the following error:
Fireplace: Connection Error: Failed to run command python3 .../vim-fireplace/pythonx/fireplace.py
You can set
g:fireplace_python_executable
in your user.vimrc
and get rid of this problem, but I wanted this to just work for people that have no patience for source code spelunking and trying to understand Microsoft logic.I'm sure this is not the best way to do this. I'd be happy if there's a better way.