Reputation: 61
I've finally decided to start working in Python but there seems to be so many versions out there. I'm mainly interested in web development in Python, so which version should I choose?
I don't know what versions the web frameworks usually support (Django, Pylons and so on) but maybe you guys know? Also, I'd like to know the key differences between the versions.
Thanks.
Upvotes: 6
Views: 1154
Reputation: 172349
You use the version supported by the web framework of your choice.
That will typically today be Python 2.6 or 2.7.
Upvotes: 0
Reputation: 18480
If you want to use shared hosters than you should use Version 2.5, because the most of them only have 2.5 (at least in my country). And if you want to use a newer version of Python, 2.7 is compatible to 2.5.
Upvotes: 0
Reputation:
Basically, there are two versions - Python 2 and 3. Of course there's 2.6, 2.7, 3.1, etc. but generally n.x is compatible with n.(x+1), just improved in some ways - neat language additons, new stdlib modules, etc. And although e.g. 2.5 and 3.0 are still available, you should generally use the latest versions (today 2.7 and 3.1) unless you have to use an older versions due to whatever external reasons. See various other questions or the Python wiki for help deciding between 2.x and 3.x in general.
But since you want to use web frameworks, the answer is clearer: You have to use Python 2, as none (or at least none of the popular ones) supports Python 3 (yet).
Upvotes: 6
Reputation: 48730
Go with Python 2.7, especially if you're looking to do Django work or any other web development. Python 3 isn't supported with Django, and most libraries work with the > 2.5 versions of Python.
Upvotes: 1
Reputation: 13927
I started out learning Python 3.0, but ended up switching to Python 2.7 after repeatedly running into issues with other libraries.
The Python website states:
"If you don't know which version to use, start with Python 2.7; more existing third party software is compatible with Python 2 than Python 3 right now."
Upvotes: 3