Search code examples
pythonwindowsgoogle-app-enginecygwin

Getting gcloud to work in Cygwin Windows


I am fairly new to programming. I have started app development on google app engine. I am trying to get the Google Cloud SDK to work with Cygwin 32 on Windows. I first ran the curl command to download the Google SDK files. Then I ran the install.py script and installed the SDK, however when calling gcloud in cygwin I receive this message:

Ammar Husain@Ammar-Computer:~
$ gcloud
/cygdrive/c/Users/Ammar Husain/google-cloud-sdk/bin/gcloud: line 102: C:\Python27: command not found

I have looked everywhere for a solution and have not been able to find one. I examined the gcloud file in the program files and it seems that there may be a problem with the Python Root Directory but I'm not sure. It may also be my Environment Variables.

Someone help?


Solution

  • First: Cygwin 32? Do you have a 32bit machine? Otherwise the 64bit Version will be the better choice!

    Please have a look here, if you DIDN'T install python via cygwin: Using python on windows

    If you DID install it via cygwin: Set up python on windows

    You might also have a look here: Set the pythonpath on cygwin

    In all cases you have to add the python-directory to the PATH-Variable in Windows AND cygwin:

    set PYTHONPATH=%PYTHONPATH%;C:\Path-to-python
    echo "PATH=\$PATH:/cygdrive/c/Path-to-python" >> .bash_profile