Python execution .. permission denied

The local repository loaded from GitHub with no problems and looks fine
I like the bash interface and am getting used to it.
problems: I can edit with vim, but find a permission error when I try to run a Python program.

I moved the repository to /mrphy/ but no help.
The problem is with the python I think.

mrphy@DESKTOP-31HL4A3 MINGW64 /c/github_stuff (practice_branch)
$ python
bash: /c/Users/mrphy/AppData/Local/Microsoft/WindowsApps/python: Permission denied

mrphy@DESKTOP-31HL4A3 MINGW64 /c/github_stuff (practice_branch)

Obviously I am missing something.

Any ideas


Hi John,

Are you working on Windows? I’m not a Windows expert, but the message indicates there is a permissions problem when running the binary.



Yes, it certainly looks like python, as installed under Windows, is not accessible to WSL / bash / mingw64. 

You can try to confirm that the “owner” of the python folder(s) and exe file include the WSL user. I.e. you need to look (under Windows) at the Windows permissions / ownership.

Alternatively, try using sudo, e.g. 

sudo python

Without know if you are running WSL or something else, it is quite possible “you can’t do that”. You’ve installed python for windows, will it work in this Unix environment? 

1 Like

I am looking for help with the same issue


uninstall python and reinstall , before select add path to system variable and then custom installation then select for all user and install. now you can run python files with python command

1 Like