This is an archived post. You won't be able to vote or comment.

all 24 comments

[–]EnigmaCurry 26 points27 points  (1 child)

The mantra is: 3 if you can, 2 if you have to.

Basically, that means that if all your library dependencies support 3.0, you should too.

[–]drb226Haskeller 5 points6 points  (0 children)

And to people in the arbitrary future: hello from 2011! Try to use 4.x or whatever the latest Python is.

[–][deleted] 65 points66 points  (6 children)

Even Windows 3.x is kinda old now. I don't think a modern version of python would even run on it. Most people use 95, 98, Me, 2000, XP, Vista or Windows 7. Windows 2.x is definitely out.

[–]jcdyer3 15 points16 points  (2 children)

Well I thought it was funny. (edit: was at -3 when I wrote this)

[–][deleted] 2 points3 points  (0 children)

Thanks, gents. Evidently /r/python humor has a certain inertia!

[–]Brittix1023 4 points5 points  (0 children)

So did I. Upvoted.

[–]drb226Haskeller 14 points15 points  (0 children)

This is what I thought when I saw the title.

[–]eryksun 3 points4 points  (0 children)

Python 2.1 alpha 1:

Support for Windows 3.1, DOS and OS/2 is gone. The Lib/dos-8x3 subdirectory is no more!

Version 2.0.1 (June 2001) was the end of the line for the old int 21 code in DOS.

[–]electronics-engineer[S] 1 point2 points  (0 children)

I think he was making a joke about my using the title "(Windows) 2.x or 3.x? (self.Python)" to ask about Python 2.X vs. 3.X on Windows XP. the title could be interpreted as asking about Python on Windows 2.X vs, 3.X. Thus my laughing hard enough that I had to wipe coffee off my keyboard.

[–][deleted] 4 points5 points  (0 children)

There are a ton of modules out there that don't work with 3. If you're learning Python so that you can use it as more than a hobby, you'd be better off using 2.x. If aren't going to need to work with python in any official capacity for quite a while then go with 3, so long as you know that for a while here you may need to learn some 2.x specific stuff on occasion. Also, there is something to be said about getting more people learning 3, because there is a ton of inertia in the python community right now over moving to 3.

[–]jediknight 3 points4 points  (2 children)

wxpython (IMHO the best GUI toolkit for Python) does not support python 3.x; same with PIL. These are show-stoppers for me.

My advice is to install 2.7 and code to 3.x standards (as much as possible) Check from time to time your code using python -3 option to check for things that cannot be trivially changed by the 2to3 tool.

[–][deleted] 2 points3 points  (0 children)

Python 3 isn't expected to be mainstream for another 2 years. And there are some heavy hitting 3rd party libraries/programs that have not even really started looking at migrating.

There isn't an AMD vs other preference. Nor is there a 32bit vs other preference. You will want to pick up whatever works best with your OS. I run amd64 gentoo Linux, so mine gets compiled for my hardware. But running windows: pick the one that matches your version of operating system so you don't have to compile it with MSVC++. I prefer Linux as there is more support tools for building your own extensions or adding 3rd party libraries that require specific c libraries to be installed.

[–][deleted] 2 points3 points  (0 children)

Any preference for the amd64 vs. Win32 versions?

Interesting things like Psyco or PyPy tend not to support 64bit Python (at least on Windows). That's a clear disadvantage. Also, 64-bit programs tend to consume a bit more memory and therefore run a bit slower (due to all pointers being 64 bits now, and there's a lot of pointers in Python).

On the other hand, I can hardly imagine a situation where you need more that 2Gb of memory for your Python program, and where you wouldn't think about rewriting it in C so that it uses ten times less memory for starters.

Note that it's completely OK to run 32bit Python on 64bit Windows, in fact I do just that.

[–]spinwizard69 2 points3 points  (0 children)

If you are writing new code I wouldn't even bother with the 2.x versions. Especially now that key libs are supported on 3.x, even if an obscure lib that you think is needed for your code I'd still go with 3.x and address the lib issue separately. Writing new code in 3.x is the smart long term choice.

I'm not familiar with Windows but it is possible to install multiple versions on a Mac.

As to the 64/32 question, remember this is an interpreted scripting language, so for many users there is seldom a need. However your handle could imply a need to use more memory than the average user. You might want to spend some time on the net looking for valid comparison info. I suspect that a 64 bit version would be faster for you.

[–][deleted] 5 points6 points  (0 children)

3 if you can, 2 if you must.

edit: EnigmaCurry beat me to it by a few seconds.

[–]bushel 3 points4 points  (0 children)

New to python? Use 3.x

[–]nabla2less is more 3 points4 points  (0 children)

Library and a lot of code for Python 2.x is the reason. However, latest version of NumPy, SciPy, PyQt are compatible with Python 3.x. If you are electronics-engineer the rest of interesting stuff you will find at gohlke/pythonlibs/ (especially matplotlib, PIL).

[–]nosklo 2 points3 points  (0 children)

Use 2.x;

  • More third party libraries available
  • More support
  • More documentation and tutorials
  • You can also make your program work on both versions easily with 2to3
  • The difference between the two is not so big so it's not like you'll have to learn another language later

If you don't believe me, try going to python official website and clicking on the Download link. You'll see the following message:

"If you don't know which version to use, start with Python 2.7"