1
votes

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?

1
Seems that gcloud requires python to be installed and it's invoking python when you run the "init" command. What happens if you run just "python" the same command shell that you're launching gcloud? If it goes into a python shell, type quit() to exit. I'm trying to see if python is installed properly.user2740650
Interesting - running "python" returns: "bash: /c/Users/me/AppData/Local/Microsoft/WindowsApps/python: Permission denied". What do you recommend as next steps?user12617173

1 Answers

2
votes

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.