Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Matthew Kosloski
Matthew Kosloski
8,932 Points

What version of Python should I use for Mac OSX?

I want to use the Django framework with Python. I'm a beginner, and I want to install the software on my computer. Which version should I install? 3.4.1 or 2.7.8?

What version is Kenneth using?

3 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

I don't recommend using Python 2 for any new work. That said, some libraries aren't up to Python 3 yet, so concessions have to be made from time to time.

We're using 3.4.x in the courses and we'll continue to, even when we start on web dev or other aspects of Python.

It's perfectly possible, though, to write code that works on both Python 2 and Python 3. Mostly it comes down to doing some special imports for Python 2 and writing Python 3 classes like you would have written Python 2 classes. Most of the time you don't need tools like 2_to_3 or six, even though both are solid helpers.

Domnick Knowlton
Domnick Knowlton
1,904 Points

Well, I would use the version that best fits my version. So if you are using a MAC OSX then I think you would want to select this one. Python 3.4.1 Windows X86-64 MSI Installer on this webpage. https://www.python.org/download/

omars
omars
9,156 Points

...Short answer: I'd learn the basics of 2 then move on to 3 so that I understand code written in using both versions. I have played with both and the transition from 2 to 3 was not a big issue in my case.

Longer answer: Kenneth is using 3.4.x in the videos. If memory serves the main difference between 2.x.x and 3.x.x is that no MAJOR development will be done for python2 so you might consider it if you just want to muck about for a bit. Python3 is the way to go for future work since python2 won't be improved much beyond it's current version. There is no backwards comparability between Python2 and Python3 ...some code can be converted from python2 to python3 using the '2_to_3' tool tho.

P.S. I have used python to make version control with a not very verbose version control system a little easier at work. Nothing much beyond that.

I hope my ramblings were of some use.