duanjiao7440
duanjiao7440
2012-07-03 02:20

GAE Go Windows-“无法运行程序”,“不是有效的Win32应用程序”

已采纳

I've been trying to run a GAE Go project I developed on my Mac on my Windows machine with GoClipse after installing and configuring the appropriate SDKs and so forth. When attempting to run the project, I get this error:

Exception occurred executing command line. Cannot run program "C:\GoogleAppEngine\dev_appserver.py" (in directory "D:\Golang\workspace\Project\src\pkg"): CreateProcess error=193, %1 is not a valid Win32 application

How can I fix that error in order to run my project?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • douzhi1919 douzhi1919 9年前

    While the below configuration works on the Mac as it has Python installed by default, Windows requires a different configuration.

    On Mac the GoClipse External Tools Configuration would be:

    Location: /GoogleAppEngine/dev_appserver.py
    Working Directory: ${workspace_loc:/Project/src/pkg}
    Arguments: .
    

    The Windows configuration should look like:

    Location: C:\Python27\Python.exe
    Working Directory:
    Arguments: C:\GoogleAppEngine\dev_appserver.py "${workspace_loc:/Project/src/pkg}"
    
    点赞 评论 复制链接分享
  • doujia8801 doujia8801 9年前

    Trying to run .py (Which IMO is a Python file?) wont work directly on windows. You will need to install Python and then pass the above filename to Python something like (I don't know Python so don't go by exact syntax, you might need to look around)

    python "C:\GoogleAppEngine\dev_appserver.py
    

    The reason it's working on Mac is because Python comes pre-installed on mac as cited here But on windows it doesn't. So you can install Python and add the Python's bin folder to path, and then run above script and it should run fine!

    点赞 评论 复制链接分享

相关推荐