2

I installed Python 3.7 via the Windows Store. I have selected this runtime environment in VScode, and VScode insists on nagging me about installing the pylint addon (or another linting addon). It attempts to run this command in a Git Bash terminal (MINGW64):

$ C:/Users/rjamd/AppData/Local/Microsoft/WindowsApps/python.exe -m pip install -U pylint --user

...which is denied permission to run:

bash: C:/Users/rjamd/AppData/Local/Microsoft/WindowsApps/python.exe:
Permission denied

Seems like they didn't really think about the distribution method screwing with permissions!

I should not be getting any permissions issues, because this is attempting to run in my local user directory, which I have full permissions on.

Full permissions are granted to:

  • SYSTEM (group)
  • rjamd (my user)
  • Administrators (group)

Everything appears to be in order.

Update:

  • Python will not run at all in the Git bash terminal, but it runs in CMD (without running CMD as admin).
  • Git bash cannot find any other instances of Python using which --all python. It prints the same executable path twice in a row. I have 3 conda environments, and two different paths for the new Python environment ("AppData" and "Program Files"), all of which show up in VScode's environment selection menu.
Ryan
  • 1,486
  • 4
  • 18
  • 28
  • What if you tried something akin to: `pip install --user package_name`. Pip by default will want to install for all users, but if you define *--user* it will only install it for the current user. – Fallenreaper Aug 11 '19 at 04:41
  • It also results in "Permission denied" – Ryan Aug 11 '19 at 04:53
  • 1
    Possible duplicate of ["Permission Denied" trying to run Python on Windows 10](https://stackoverflow.com/questions/56974927/permission-denied-trying-to-run-python-on-windows-10) – Ryan Aug 11 '19 at 05:04

2 Answers2

2

I got a solution by disabling execution aliases of python in

Windows setting > Manage app execution aliases

See Also: bash: ...Microsoft/WindowsApps/python3: Permission denied

KyleMit
  • 30,350
  • 66
  • 462
  • 664
user132848
  • 21
  • 3
1

(Microsoft employee and CPython core developer here).

This is most likely a bug in Git Bash. They are probably trying to read some information from the executable in a way that doesn't handle reparse points correctly (and may not be able to handle Windows symlinks either, in that case).

Launching the executable under AppData from anywhere else in Windows should be okay, though if you can't launch it with PowerShell or cmd.exe, please use the Windows Feedback tool to report a bug for the team.

Zooba
  • 11,221
  • 3
  • 37
  • 40
  • 1
    Have you thought of creating an issue on their end? This will affect quite some devs once WinGet starts to spread. Most devs I know, use Bash on Windows... – Martin Rauscher May 21 '20 at 20:30