Running Boto on Google App Engine (GAE)

纵然是瞬间 提交于 2019-12-07 03:30:55

问题


I'm new to Python and was hoping for help on how to 'import boto.ec2' on a GAE Python application to control Amazon EC2 instances. I'm using PyDev/Eclipse and have installed boto on my Mac, but using simply 'import boto' does not work (I get: : No module named boto.ec2). I've read that boto is supported on GAE but I haven't been able to find instructions anywhere. Thanks!


回答1:


It sounds like you haven't copied the boto code to the root of your app engine directory.

Boto works with GAE but Google doesn't supply you with the code. Once you copy it into the root of your GAE directory, the dev server should work, and after your next upload it will work on the prod server as well.




回答2:


Symbolic link should be enough. in your project root:

ln -s /path/to/boto/boto boto

Google app engine will upload it while deploying your app.



来源:https://stackoverflow.com/questions/15889424/running-boto-on-google-app-engine-gae

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!