Does Google App Engine support Python 3?

2024/11/20 10:26:19

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?)

Answer

No, It doesn't.

[Editor's note: As of Aug, 2018, this answer is outdated; see comments and other answers]

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.

https://en.xdnf.cn/q/26331.html

Related Q&A

how to subquery in queryset in django?

how can i have a subquery in djangos queryset? for example if i have:select name, age from person, employee where person.id = employee.id and employee.id in (select id from employee where employee.com…

Opening sqlite3 database from python in read-only mode

While using sqlite3 from C/C++ I learned that it has a open-in-read-only mode option, which is very handy to avoid accidental data-corruption. Is there such a thing in the Python binding?

SyntaxError: Generator expression must be parenthesized

I just installed django and after installing that I created a django project and was trying to run django server by command:python manage.py runserverAfter that Iam getting error as: SyntaxError: Gene…

ValueError: max() arg is an empty sequence

Ive created a GUI using wxFormBuilder that should allow a user to enter the names of "visitors to a business" into a list and then click one of two buttons to return the most frequent and lea…

How to write native newline character to a file descriptor in Python?

The os.write function can be used to writes bytes into a file descriptor (not file object). If I execute os.write(fd, \n), only the LF character will be written into the file, even on Windows. I would …

pandas combine two columns with null values

I have a df with two columns and I want to combine both columns ignoring the NaN values. The catch is that sometimes both columns have NaN values in which case I want the new column to also have NaN. H…

Python equivalent of zip for dictionaries

If I have these two lists:la = [1, 2, 3] lb = [4, 5, 6]I can iterate over them as follows:for i in range(min(len(la), len(lb))):print la[i], lb[i]Or more pythonicallyfor a, b in zip(la, lb):print a, bW…

Can I prevent fabric from prompting me for a sudo password?

I am using Fabric to run commands on a remote server. The user with which I connect on that server has some sudo privileges, and does not require a password to use these privileges. When SSHing into th…

Managing connection to redis from Python

Im using redis-py in my python application to store simple variables or lists of variables in a Redis database, so I thought it would be better to create a connection to the redis server every time I n…

Writing a Python extension in Go (Golang)

I currently use Cython to link C and Python, and get speedup in slow bits of python code. However, Id like to use goroutines to implement a really slow (and very parallelizable) bit of code, but it mus…