classification
Title: Python 3.7 and 3.8 in Windows Store do not start under git bash
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: paul.moore, pletnes, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-11-07 10:28 by pletnes, last changed 2019-11-09 22:49 by steve.dower. This issue is now closed.

Messages (3)
msg356183 - (view) Author: Paul Anton Letnes (pletnes) * Date: 2019-11-07 10:28
Python 3.7 and 3.8 installed from the  Windows Store do not start under git bash. Rather, they give some variation of this error message:

bash: /c/Users/pa/AppData/Local/Microsoft/WindowsApps/python: Permission denied

However, the permissions are rwxr-xr-x, or 755 if you prefer. The same error occurs if I try to run pip.

How can I run python under git bash? I use python and various pip-installed executables (e.g. black) for git hooks, so this has to work for my workflow.
msg356275 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-11-09 00:00
['crash' means something like Windows 'your program has quit running' box.]

Do other Windows Store 'apps' run from bash? (Or from Command Prompt or Power Shell?)

For an immediate solution, install Python normally, as a command-line program, with the python.org Windows installer.

Terry@Tejarex MINGW64 ~
$ python
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

Terry@Tejarex MINGW64 ~
$ py
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

Terry@Tejarex MINGW64 ~
$ py -m idlelib
[IDLE 3.8 shell runs]

You should then be able to run 'py -x.y pip install ...' to install to python x.y.

Steve, can and will you make store python runnable under bash or should this be closed?
msg356309 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-11-09 22:49
The problem is that Cygwin (on which MinGW and Git Bash are based) tries to read the contents of the executable file, rather than just executing it. The type of link used by Windows here cannot be read as a normal file.

The provided workaround is the best we can offer. Someone who is allowed to handle GPL code without impacting their job (not me) could try removing whatever additional check is being attempted here in Cygwin.
History
Date User Action Args
2019-11-09 22:49:15steve.dowersetstatus: open -> closed
resolution: third party
messages: + msg356309

stage: resolved
2019-11-09 00:00:47terry.reedysettype: crash -> behavior

messages: + msg356275
nosy: + terry.reedy
2019-11-07 10:28:14pletnescreate