I am trying to install the Google Cloud SDK on my Windows machine. I have Python 2.7 currently installed on this machine, and it's located in the System Variables Path like this -> C:\Python27\;
I am getting this error during installation:
ERROR: gcloud failed to load: DLL load failed: %1 is not a valid Win32 application.
The error message also prompts me to check the Python executable by saying:
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.
So, I'm trying to set the CLOUDSDK_PYTHON environment variable in the install.sh shell script...But nothing is working. Here is the code from that file:
echo Welcome to the Google Cloud SDK!
if [ -z "$CLOUDSDK_PYTHON" ]; then
if [ -z "$(which python)" ]; then
echo
echo "To use the Google Cloud SDK, you must have Python installed and on your PATH."
echo "As an alternative, you may also set the CLOUDSDK_PYTHON environment variable"
echo "to the location of your Python executable."
exit 1
fi
CLOUDSDK_PYTHON="python"
fi
I have tried python2.7
, and the path to the executable, C:\Python27
, but I'm getting this error when I try to run the script with those variables:
install.sh: line 128: $'python\r': command not found
I found this stack question, but none of the solutions worked for me. Any help would be great appreciated.