Reputation: 53
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?
Upvotes: 5
Views: 4904
Reputation: 1309
After installing python 3.8 in my cygwin (with cygwin setup-x86_64.exe), I've used the versioned archive for Linux from
https://cloud.google.com/sdk/docs/downloads-versioned-archives
Then, I installed it in my cygwin home directory with this steps:
$ tar -xvf google-cloud-sdk-xxx.x.x-linux-x86_64.tar.gz
$ ./google-cloud-sdk/install.sh
$ source ~/.bashrc //
It worked for me
Upvotes: 1
Reputation: 61
I was having the same problem with Python not understanding the cygwin path. Instead of changing the gcloud script I created a C:/cygdrive
folder. Then, I opened a windows command prompt and cd
ed to the new folder. There, I ran mklink /D c C:\
.
This created a link to the C:
drive in such a way that Python understands /cygdrive/c/…
.
Upvotes: 6
Reputation: 373
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
Upvotes: 2