Thursday, 22 August 2013

Poll question: Time for Python 3?

Holy Grail AleThis year's poll question is...if you use Python, which Python do you use? (See the sidebar on the left.)

By way of background, Python 3.0 was first released back in Dec 2008. Almost five years later, many are still using a Python 2.x version. For scientists, the main blocker was numpy, which only supported Python 3 since Sep 2010, but additionally IPython took until July 2011 and matplotlib has only this year (Jan) supported Python 3.

In cheminformatics, Open Babel has supported Python 3 since March 2009 but neither RDKit nor OEChem has yet added Python 3 support. However Greg is currently thinking about it (if you're for it, you can support this idea on Google+).

It's interesting to look in more detail at the Windows downloads for the OB Python releases. For OB 2.3.1 released in Oct 2011, the ratio of Python 2 to Python 3 downloads is 4:1 (2.5:148, 2.6:238, 2.7:983, 3.1:41, 3.2:301) while for OB 2.3.2 released in Nov 2012, the ratio is 2.5:1 (2.6:81, 2.7:424, 3.2:73, 3.3:129). The trend is obvious but it seems that change is slow.

Image credit: Fox Fotography (Oliver on Flickr)

2 comments:

kott said...

1. Most of python software runs fine on python 2.7.X (in my case X=5).
2. Use six for python 2-3 cross compatibility in your software(http://pythonhosted.org/six/)

Casper Steinmann said...

I've actually tried running some of my stuff using Python 3 without a hickup or with minor changes. Some of the backports that made it into 2.7 has really also helped alot with the transition.

I'm all for the change but it does indeed seem scary!