duanmao9918 2012-07-03 01:49
浏览 59

如何从头开始在Windows上正确配置GAE Go SDK和GoClipse?

I've been a GAE Go developer for a year now, and seeing that the SDK became available on Windows, I figured I'd try it out. However, I am having problems finding any documentation on how to install it properly from scratch. I have no idea what steps to take to ensure that my projects will be running properly, so I'd like to know what is the proper way to install and configure Google App Engine Go SDK and GoClipse on Windows?

  • 写回答

1条回答 默认 最新

  • du8794 2012-07-28 13:42
    关注

    Same here. The GAE GO SDK needs some more Windows install instructions...

    As of today 2012-07-28 I just got it working on Win 7 by:

    • downloading the App Engine SDK for GO here: developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go and selected the Win 32 bit in my case googleappengine.googlecode.com/files/go_appengine_sdk_windows_386-1.7.0.zip

    • I unzipped the GO SDK in C:\googleappenginego (make it the name you like).

    • Then I added that folder path to the PATH environment variable in th System settings Advanced Settings:

    My "Path" is set at:

    C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Windows Live\Shared;C:\SWTOOLS\ReadyApps;%JAVA_HOME%\bin;C:\googleappenginego\
    
    • I installed Python 2.7.3 from: www.python.org/download/ selected this version: www.python.org/ftp/python/2.7.3/python-2.7.3.msi I installed it in the default folder C:\Python27 by launching the python-2.7.3.msi file

    • I created the GO GAE project as indicated in the GAE GO Getting Started series: developers.google.com/appengine/docs/go/gettingstarted/helloworld

    • After creating the C:\myapp\app.yaml and C:\myapp\hello\hello.go, launch the project by opening a cmd window from the Win "Start/Run..." menu.

    Then type in: "dev_appserver.py c:\myapp\" You should see something like:

    WARNING  2012-07-28 12:32:20,154 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
    INFO     2012-07-28 12:32:20,650 appengine_rpc.py:160] Server: appengine.google.com
    INFO     2012-07-28 12:32:20,654 appcfg.py:582] Checking for updates to the SDK.
    INFO     2012-07-28 12:32:22,119 appcfg.py:600] The SDK is up to date.
    WARNING  2012-07-28 12:32:22,150 dev_appserver.py:3498] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError:
    No module named _imaging
    INFO     2012-07-28 12:32:22,163 dev_appserver_multiprocess.py:647] Running application dev~helloworld on port 8080: http://localhost:8080
    INFO     2012-07-28 12:32:22,164 dev_appserver_multiprocess.py:649] Admin console is available at: http://localhost:8080/_ah/admin
    INFO     2012-07-28 12:32:36,851 __init__.py:440] building _go_app
    INFO     2012-07-28 12:32:37,849 __init__.py:417] running _go_app, HTTP port = 34762, API port = 42835
    WARNING  2012-07-28 12:32:38,443 dev_appserver.py:2733] Failed removing c:\users\fred\appdata\local\tempequest.8mmuoy.tmp
    INFO     2012-07-28 12:32:38,480 dev_appserver.py:2952] "GET / HTTP/1.1" 200 -
    INFO     2012-07-28 12:32:38,588 dev_appserver.py:2952] "GET /favicon.ico HTTP/1.1" 200 -
    INFO     2012-07-28 12:32:54,849 __init__.py:440] building _go_app
    INFO     2012-07-28 12:32:55,755 __init__.py:417] running _go_app, HTTP port = 34762, API port = 42835
    WARNING  2012-07-28 12:32:56,572 dev_appserver.py:2733] Failed removing c:\users\fred\appdata\local\tempequest.slayyf.tmp
    INFO     2012-07-28 12:32:56,602 dev_appserver.py:2952] "GET / HTTP/1.1" 200 -
    INFO     2012-07-28 12:32:56,694 dev_appserver.py:2952] "GET /favicon.ico HTTP/1.1" 200 -
    

    Then go into your browser and go to "http://localhost:8080" to see your app or "http://localhost:8080/_ah/admin/" for the admin console.

    Change the hello.go file, change "Hello, world" to "Hello, galaxy" for example and refresh the localhost:8080 browser window. It should show the new message without crashing or restarting the server. See right below:

    NOTE: don't install Python 2.5.x, that was my initial mistake, despite what the GO SDK says. It will run but it dies when I modify the hello.go source code and refresh the browser window with some like that:

    <type 'exceptions.AttributeError'>: 'module' object has no attribute 'kill' 
          args = ("'module' object has no attribute 'kill'",) 
          message = "'module' object has no attribute 'kill'"
    
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口