Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why am i getting (gsutil): "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe": command not found

After installing Google cloud sdk and connecting to desired firebase project i am receiving :

ERROR: (gsutil) "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe": command not found when running any gsutil command.

My current stup is:

windows 10
Google Cloud SDK 281.0.0
bq 2.0.53
core 2020.02.14
gsutil 4.47
python 3.7

My theory is, that while installed "correctly" python doesnt have access to gsutil commands

like image 461
caffieineAnxiety Avatar asked Feb 26 '20 00:02

caffieineAnxiety


2 Answers

I had the same problem and I was able to solve it by setting a new environment variable for CLOUDSDK_PYTHON. On windows 10 you can do this from the command line in 2 ways:

  1. Set an env variable for the current terminal session set CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

  2. Set a permanent env variable setx CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

The file path will probably be different for everyone, so check first where is python.exe located and use your own path. I hope this helps.

like image 186
Vlad Caciuc Avatar answered Oct 20 '22 18:10

Vlad Caciuc


Run:

set CLOUDSDK_PYTHON=C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe

Note: There should be no quotes around the python path like this "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe" or it would attempt to run the command with quotes, which we know won't work.

like image 1
Isaac Aderonmu Avatar answered Oct 20 '22 19:10

Isaac Aderonmu