How-to: gsutil for Windows (no cygwin involved)

705 views
Skip to first unread message

David the Dude

unread,
Jul 21, 2010, 10:56:00 AM7/21/10
to gsutil-discuss
Hi,

not sure if this is relevant to anyone but here are some brief
instructions to get gsutil to work under Windows, no cygwin or code
modifications involved. I have not tested all functionality. I am just
posting this since gsutil is advertised to work with Linux/MacOS only.

I did the following:
1. Re-name gsutil to gsutil.py, to enable command line execution
provided .py files are associated to the Python interpreter
2. Append the absolute path to the gsutil directory to the PATH
environment variable
3. Create or append the absolute path to gsutil\boto to the PYTHONPATH
environment variable
4. Create (unlikely it exists) a HOME environment variable to point to
wherever you like and have the proper rights (try echo %USERPROFILE%
in cmd)
5. Run cmd and do "gsutil.py ls" (any valid command will do) to create
the .boto config file

This should be all. Environment variables are permanently set in the
Advanced System Properties menu in Windows. There are other ways to
get this up and running (check reference to BOTO_CONFIG environment
variable in gsutil\boto\boto\pyami\config.py) but this may be the
easiest one.

/David

Meteor

unread,
Jan 31, 2011, 9:41:21 PM1/31/11
to gsutil-...@googlegroups.com
Yes.
You are right.

jason....@mnhs.org

unread,
May 22, 2012, 3:51:13 PM5/22/12
to gsutil-...@googlegroups.com
wow....been struggling for 2 damn days with this.  i couldn't get the gsutil command to be recognized even after doing all of the environment variable setups, cgwin install, etc... for windows.  at one point, i thought to myself...maybe i should add the ".py" to the end of the gsutil file...but that was a shot in the dark and so i never took the time to try and open the file with notepad to see what the hell it was.  Anyway...as soon as i renamed and launched the copy command to move my .sql file up to cloud storage...boom!  thanks a million!

Jason

Google Storage Team

unread,
May 22, 2012, 3:57:28 PM5/22/12
to gsutil-...@googlegroups.com
Thanks Jason and David - I just submitted an internal request to have a version of this info included in our official documentation for gsutil.

Marc
Google Cloud Storage Team
Reply all
Reply to author
Forward
0 new messages