Installing Python 3 on Ubuntu (and Debian) Linux

January 31, 2010

I’m still seeing a certain amount of traffic hitting this site from queries searching for help installing Python 3 on Ubuntu and Debian Linux systems. Because of what I would call the conservatism of both distros, unless you are using the very latest releases, you won’t have the latest versions available. I do completely understand the reasons both the Ubuntu and Debian communities have for their update policies, but it does put users in a bind if they want to try Python 3 without updating their entire distribution.

Since I’m really behind the notion of people moving to Python 3 (not only did I write a book about it, Python 3 is a better language), let me recap your options for installing Python 3 on Ubuntu systems. The same approach will work for Debian boxes.

Use a package when you can…

As I mention in The Quick Python Book, the easiest and most reliable way to install Python is to use a precompiled package. If you’re using Karmic or later, that’s no problem. The packages are right there and ready to go. Go for the python3 and idle3 packages and you’ll get a complete Python 3.1 environment with no hassle at all.

You might be able to find precompiled Python 3 packages either on or elsewhere, but I haven’t found any that are both the latest release of Python and that include IDLE. If you find packages that you trust that meet your requirements, by all means, go for it.

But if you can’t…

However, if you can’t get Python 3.1 packages, you will need to do things the hard way. Note that in Jaunty (8.10) there are Python 3.0 packages, but don’t bother – in the year since the initial release of Python 3.0, there have been several incremental improvements, particularly to file I/O, that mean 3.0 is now just history.

So “the hard way”. As far as I know, the only way to get a complete Python3+IDLE install on versions before Karmic is to compile from source. To do that, you need to follow the instructions in this post, except that you should get the latest version of Python 3.x, currently 3.1.1. The install is pretty resilient – that is, you’re likely to get something, even if you’re missing a few dependencies. If you follow the instructions, you should get everything you need and not have to upgrade your distro until you’re darned good and ready.


My “Don’t miss” posters for PyCon 2010

January 19, 2010

I’m co-ordinating the first ever poster session for PyCon US in Atlanta this year and things are finally coming together. We have 18 posters set for our 90 minute session in the Expo Hall (with snacks!) Sunday morning. I wouldn’t have minded having a few more posters, but we have a strong collection, and the current numbers mean one can spend only 5 minutes per poster, less if you take into account standing in the snack line.

So I’m thinking about the posters I particularly don’t want to miss. If  you want to do the same, you can visit and see the lineup. Here’s my list of “don’t miss” posters:

  • P3. “Python 3.1, Unicode, and Languages of the Indian Ocean Region”, by Carl Trachte – I studied Sanskrit and Egyptian in grad school, and I’ve always been interested in languages and fonts. And I have to trade a few jokes with Carl.
  • P9. “3to2”, by Joe A Amenta – the potential of 3to2 to help drive adoption of Python 3 is so great I just have to see this. And say “way to go” to Joe in person.
  • P13. “Distributed Version Control in the Classroom”, by Dr. Daniel Rocco, Will Lloyd – as a teacher of programming I’ve tried (and not really succeeded) to introduce a DVCS before. I need to see how these guys make it work.
  • P14. “Join Open Source! We need you – tips on finding a project”, Asheesh Laroia – How can I not want to see a poster from someone who would make a “Soylent Green” joke in his decription? 😉
  • P20. “Teaching Programming with Python & Robots”, Jay Summet – Teaching programming with cute little blue robots – ’nuff said!

Installing Python 3 on Windows (video)

January 14, 2010

I’ve posted a screencast on YouTube to walk through the process of installing Python 3 on Windows. Not that it’s really that hard, but if anyone has any questions about the process, it might be worth a watch.

Installing Python 3.1 on Windows

Quick Python Book, 2nd ed is here!

January 11, 2010

Amazing. I had been told that I would be holding a physical copy of The Quick Python Book, 2nd ed in my  hands on January 11. Of course, I understood what that really meant –  I’m no fool. “January 11” meant some time in January… if all goes well… definitely the first quarter… certainly by June… well, some time in 2010, that’s for sure.

Oh yeah, I knew the score. Well, Manning Publications has amazed me again. When I got home this afternoon (yes, January 11), a box was waiting… yes with some shiny, physical and very much on time copies of QPB2, as I’ve come to call it.

So if you’ve ordered it or are thinking of ordering it, copies should be making their way to booksellers shortly. And if you buy a paper copy be sure to visit the book’s homepage at to register and get a free ebook version as well.