Maybe it’s just me, but lately I’ve been hearing a lot of people push python 3 pretty heavily. Some people are surprised at how many people continue to use python 2. Here’s an example.

The host of Talk Python To Me has also brought the topic up several times. Now that python 3.5 has been released, I expect this to become an even bigger deal.

However, I’ve found that most people recommending that new projects be written in python 3 are ignoring a significant reason to stick to python 2.

It’s the power of defaults. OS X ships with python 2 by default. None of the Linux distributions I use (Ubuntu, RHEL, CentOS) ship with python 3 by default.

Now yes, I hear you. It’s just a brew install or apt-get install away. But, if you’re trying to distribute something written in python to a bunch of people who don’t care what language it’s written in, it’s really hard to convince them to install anything.

However, it’s a lot easier to ask them to do one of these:

  • sudo pip install mything
  • Download a single file and run ./mything.py
  • Download a folder, unzip it and run ./mything.py

So in conclusion, if you want to get me to use python 3, the trick is to either get OS vendors to make python 3 the default, or to give me a way to distribute python scripts with my choice of interpreter bundled. Given that the python distribution story is such a mess today, I’d love for the solution to be the latter.

If you have a way around this problem, I’d love to hear about it.

Gopal Sharma

gps gopalkri


Published