Comparing methods of deploying Python applications

I had a cry last month about deploying a Python application to end-users being more fiddly and difficult than I expected it to be. I’m talking about py2exe, Freeze, and their ilk.

As a quick follow-up, I recently posted to comp.lang.python about a spreadsheet I’ve made, comparing comparing the solutions I’ve found thus far:

http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html

Each column represents a method of distributing a Python application to an end-user without them having to worry about what Python is or whether they have an appropriate version of it installed. ‘Bundle’ represents manually bundling an interpreter with your application. ‘Bootstrap’ represents a sort of fanciful vision of manually creating a compiled installer which downloads and installs an interpreter if required, before running your Python application on it. The other columns represent the various splendid projects like py2exe which perform the bundling process for you.

Each row represents a reason to choose between them. By my criteria, which are no doubt idiosyncratic, cx_freeze or maybe PyInstaller are starting to look like good contenders for future projects.

Obviously feedback about any wrong-headedness on my part is appreciated.

5 thoughts on “Comparing methods of deploying Python applications

  1. Yah, bootstrap seems like the best solution – but obviously it’s not trivial. It would have to test if any of the currently installed interpreters are of a suitable version, and if not, download and install one, side by side with existing ones, and make sure your program gets run with that version, but all other python programs remain unaffected.

    I know on Windows there’s a list of installed interpreters in the registry. Is there an equivalent on other platforms?

  2. Actually, come to think of it, now that I describe what ‘bootstrap’ would have to do, it seems like it’s crying out for a robust version of ‘pychoose’ that I created the other day. I didn’t realise these two itches of mine were so intimately overlapping.

  3. Perhaps if I create a dead simple version of Bootstrap, which doesn’t worry about what version of Python your script needs, then maybe I could interest people in trying to help me improve it. Hmmm.

  4. Hmm. That’s not going to work, exactly as stated. At the very least, each application would need to maintain it’s own virtualenv, to avoid clobbering versions of libraries needed by other applications.

    To do it right is going to be a bunch of work.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>