What version of Python should I use for web development?


I finally decided to start working on Python, but there seem to be so many versions. I am mostly interested in web development in Python, so which version should I choose?

I don’t know which versions usually support web frameworks (Django, Pylons, etc.), but maybe you guys know? In addition, I would like to know the main differences between the versions.

Thanks.

+6
python version
source share
6 answers

In principle, there are two versions - Python 2 and 3. Of course, there are 2.6, 2.7, 3.1, etc., but in the general case nx is compatible with n. (x + 1), has just improved in a sense - with neat language additions, new stdlib modules, etc. And although, for example, 2.5 and 3.0 are still available, you should usually use the latest versions (today 2.7 and 3.1) if you do not have to use older versions for some external reasons. See various other questions or the Python wiki for help between 2.x and 3.x in general.

But since you want to use web frameworks, the answer is clear: you need to use Python 2, since none (or at least none of the popular ones) support Python 3 (for now).

+6
source share
+3
source share

I started learning Python 3.0, but ended up migrating to Python 2.7 after running issues with other libraries many times.
The Python website says, "If you don’t know which version to use, start with Python 2.7, more existing third-party software is now compatible with Python 2 than Python 3."

+3
source share

Go with Python 2.7, especially if you want to work with Django or any other web development. Python 3 is not supported by Django, and most libraries work with versions> 2.5 of the Python version.

+1
source share

If you want to use shared hosters, than use version 2.5, since most of them have only 2.5 (at least in my country). And if you want to use a newer version of Python, 2.7 is compatible with 2.5.

0
source share

You are using the version supported by the web infrastructure of your choice.

This will usually be Python 2.6 or 2.7.

0
source share

All Articles