What is the recommended version of python for Django framework?

11,231

Solution 1

Nowadays (Feb 2017), the choice is absolutely clear to me - Python 3. Django fully supports it since 1.6 and, moreover, Django 2.0 will be Python3.5+ only.

To check whether your dependency supports Python-3.x or not, use Can I use Python 3? service. Also, check Django Packages directory of reusable Django apps - besides other features there is an indication whether a package supports 3.x or not.

Also, there were a lot of topics about the subject:


Old Answer:

This is basically a question whether to choose Python-2.x or Python-3.x.

Should I use Python 2 or Python 3 for my development activity? article in Python docs says:

Which version should I use?

Which version you ought to use is mostly dependent on what you want to get done.

Since you don't know your requirements yet - then, just to be safe, better stick to 2.x branch. Currently, it has a lot more batteries for all sort of tasks, and not all of them migrated to Python-3.x. Note that it is important to stick with the latest release, in case of 2.x branch - currently, it would be Python 2.7.7.

Solution 2

Use the latest version of 2.7 - you really can't go wrong there.

In a year or two my answer might be 3.x, but for now there's better library support for 2.x

Solution 3

With the current and older versions of Django, you can use up to version 3.2 or 3.3, but I believe Python 3.5 is not supported until Django releases the new version 1.7 - which everyone is waiting for, because then we can delete the line called 'south' from our requirements.txt.

Share:
11,231
IndyZa
Author by

IndyZa

Updated on June 17, 2022

Comments

  • IndyZa
    IndyZa almost 2 years

    *Note: I have never done something like this before(Completely Newbie), just abit on Python 2.7.3 like a year ago.

    As the title I have check out some of the question but it was way back to 2011-2013.

    I would like to make a simple website, work kind of like kickstarter,in addition, have no realtime-chat. Just a simple post/comment section.

    And yes I know the downside is the supported library but the problem is I don't know any of the library that I should be using on.

    Which version should I use? Any suggestion?

    I have been research on this https://wiki.python.org/moin/Python2orPython3#fnref-4fcb00922956f144dafd52e4f75d82631e225d1b

  • IndyZa
    IndyZa almost 10 years
    Yeah, there were too much topic about this which make me hesitate about it. Thanks for the suggestion :).
  • IndyZa
    IndyZa almost 10 years
    Thanks for the suggestion man.
  • Jason Capriotti
    Jason Capriotti over 7 years
    It's two years later... Did your answer change? :)
  • Tom Christie
    Tom Christie over 7 years
    Yup! I'd use Python 3 for new projects wherever possible. The library support is pretty comprehensive now.
  • FreeKrishna
    FreeKrishna over 7 years
    How about now in 2017? is 3.x good to go with?
  • alecxe
    alecxe over 7 years
    @FreeKrishna nowadays, it is absolutely and definitely 3.x. Django has plans to drop support for Python 2 in Django 2.x. I'll update the answer. Thanks.
  • FreeKrishna
    FreeKrishna over 7 years
    Good to know. Im just starting up with python. Thanks :)