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

时间:2012-07-03 01:49:17

标签: windows google-app-engine sdk installation go

我已经成为GAE Go开发人员一年了,看到SDK became available on Windows,我想我会尝试一下。但是,我在查找有关如何从头开始正确安装的任何文档时遇到问题。我不知道采取了哪些措施来确保我的项目能够正常运行,所以我想知道在Windows上安装和配置Google App Engine Go SDK和GoClipse的正确方法是什么?

1 个答案:

答案 0 :(得分:9)

同样在这里。 GAE GO SDK需要更多Windows安装说明......

截至2012-07-28,我刚刚通过以下方式开始使用Win 7:

  • 在此处下载App Engine SDK for GO: developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go 在我的案例中选择了Win 32位 googleappengine.googlecode.com/files/go_appengine_sdk_windows_386-1.7.0.zip

  • 我在C:\ googleappenginego中解压缩GO SDK(将其命名为您喜欢的名称)。

  • 然后我在系统设置高级设置中添加了PATH环境变量的文件夹路径:

我的“路径”设置为:

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\
  • 我从以下位置安装了Python 2.7.3: www.python.org/download/ 选择此版本: www.python.org/ftp/python/2.7.3/python-2.7.3.msi 我通过启动python-2.7.3.msi文件将它安装在默认文件夹C:\ Python27中

  • 我按照GAE GO入门系列中的说明创建了GO GAE项目: developers.google.com/appengine/docs/go/gettingstarted/helloworld

  • 创建C:\ myapp \ app.yaml和C:\ myapp \ hello \ hello.go后,通过打开Win“开始/运行...”菜单中的cmd窗口启动项目。

然后输入:“dev_appserver.py c:\ myapp \” 你应该看到类似的东西:

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\temp\request.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\temp\request.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 -

然后进入浏览器并转到“http:// localhost:8080”以查看您的应用程序或管理控制台的“http:// localhost:8080 / _ah / admin /”。

更改hello.go文件,将“Hello,world”更改为“Hello,galaxy”,然后刷新localhost:8080浏览器窗口。它应该显示新消息而不会崩溃或重新启动服务器。见下文:

注意:不要安装Python 2.5.x,这是我最初的错误,尽管GO SDK说的是什么。它会运行,但是当我修改hello.go源代码并刷新浏览器窗口时,它会死掉:

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