Google App Engine是否支持Python 3? [英] Does Google App Engine support Python 3?

查看:112
本文介绍了Google App Engine是否支持Python 3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始学习 Python 3.4 ,并希望开始使用库以及 Google App Engine ,但大多数 Python 库仅适用于支持 Python 2.7 ,并且与 Google App Engine 相同。



我应该学习 2.7 而不是还有更简单的方法? (可以同时在我的机器上安装2个Python版本吗?)

解决方案

't。



Google App Engine (GAE) Python 应用程序,c $ c>使用沙盒 Python 2.7 运行时。这是普通的 App Engine Hosting 。但是,在 GAE 中,您可以使用 托管虚拟机托管


$ b 托管VM托管可让您在 Google上配置 GAE 应用程序计算引擎虚拟机。给你更多的灵活性。 托管虚拟机目前仅在Alpha阶段支持 Java 7 Python 2.7 Go 1.4 运行时环境。要获得其他运行时(如 Python 3 node.js ),您可以创建用户可配置的自定义运行时



注意:托管虚拟机时,您将不具备 Python 2.7 GAE 库。




  • 如果您坚持使用 GAE ,因为> Python 3 + 不可行,所以我建议学习 2.7 GAE 库移植到 Python 3 + 时的 3 + 版本。如果您了解其中一个版本,您可以轻松切换到另一个版本。如果你坚持使用 Python 3 + ,你可以使用 Heroku Microsoft Azure 。它们都支持 Python 2.7 3.4


>

I started learning Python 3.4 and would like to start using libraries as well as Google App Engine, but the majority of Python libraries only support Python 2.7 and the same with Google App Engine.

Should I learn 2.7 instead or is there an easier way? (Is it possible to have 2 Python versions on my machine at the same time?)

解决方案

No, It doesn't.

Google App Engine (GAE) uses sandboxed Python 2.7 runtime for Python applications. That is the normal App Engine Hosting. However, in GAE you can use Managed VM Hosting.

The Managed VM Hosting lets you run GAE applications on configurable Google Compute Engine Virtual Machines. Giving you more flexibility. Managed VMs at the moment ,at Alpha phase, only support Java 7, Python 2.7 and Go 1.4 runtime environments. To get other runtimes (like Python 3 or node.js) you can create user-configurable custom runtime.

Note: With Managed VMs you won't have the capabilities of Python 2.7 GAE libraries.

  • If you insist on using GAE, since Python 3+ is not viable, I would suggest learning 2.7 and switching to 3+ versions when GAE libraries gets ported to Python 3+. You can easily switch to the other if you learn one of the versions.

  • If you insist on using Python 3+, you can use Heroku or Microsoft Azure. Both of them supports Python 2.7 and 3.4.

这篇关于Google App Engine是否支持Python 3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆