Search code examples
google-cloud-platformgcloudgoogle-cloud-sdk

'gcloud init' command returns "Permission denied"


I've installed Google Cloud SDK on my laptop. The gcloud command is available/accessible via git bash from any subdirectory. However, the gcloud init command returns the following error:

/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/gcloud: line 191: /c/Users/me/AppData/Local/Microsoft/WindowsApps/python: Permission denied /c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/gcloud: line 191: /c/Users/me/AppData/Local/Microsoft/WindowsApps/python: Permission denied

Any idea what the issue might be or how to debug it?


Solution

  • Hmm, so your shell is bash? And you're on Windows apparently, so try using a cmd shell (at the start menu, hunt for cmd and run it). See if you can run python from there. If that works, then running gcloudshould probably work too.

    If that doesn't work, then you've probably got python installed improperly somehow. If you didn't install it, maybe something else installed it for you as part of a package. You should probably uninstall and reinstall it (https://www.python.org/downloads/). Also check if gcloud requires any specific version of python first.