Entries tagged with “Distribution”.


When you’re first starting out as a Python programmer, you don’t think about how you might need to install an external package or module. But when that need appears, you’ll want to know how to in a hurry! Python packages can be found all over the internet. Most of the popular ones can be found on the Python Package Index (PyPI). You will also find a lot of Python packages on github, bitbucket, and Google code. In this article, we will be covering the following methods of installing Python packages:

  • Install from source
  • easy_install
  • pip
  • Other ways to install packages

(more…)

This is the last article of my “Build a Binary Series”. If you haven’t done so already, be sure to check out the others. For our finale, we are to look at Andrea Gavana’s wxPython-based GUI2Exe, a nice graphical user interface to py2exe, bbfreeze, cx_Freeze, PyInstaller and py2app. The latest release of GUI2Exe is 0.5.0, although the source may be slightly newer. Feel free to run from the tip as well. We’ll be using the example scripts that we used for several of the previous articles: one console and one GUI script, neither of which do much of anything. (more…)

The bbfreeze package also allows us to create binaries, but only on Linux and Windows. It’s just an easy_install away, so if you plan on following along with the examples in the article, you should go get it. The bbfreeze package includes egg support, so it can include egg dependencies in your binary, unlike py2exe. You can also freeze multiple scripts at once, include the Python interpreter and more. According to bbfreeze’s PyPI entry, it’s only been tested with Python 2.4-2.5, so keep that in mind. However, I was able to use it with Python 2.6 with no obvious problems. (more…)

In this article, we will be learning about cx_Freeze, a cross-platform set of scripts designed to “freeze” Python scripts into executables in a manner similar to py2exe, PyInstaller, etc. We will freeze one console script and one window (i.e GUI) script, using the examples from the previous article in this series. If you haven’t done so already, you can get cx_Freeze here. Let’s get this party started, shall we? (more…)

In our previous article on building binaries, we learned a little about py2exe. This time around, we will be focusing our collective attention on the ins and outs of PyInstaller. We’ll use the same lame wxPython script from the last article for one of our examples, but we’ll also try a normal console script to see what the differences are, if any. In case you didn’t know, PyInstaller works on Linux, Windows and Mac (experimental) and works with Python 1.5-2.6 (except on Windows, where there’s a caveat for 2.6 – see below). PyInstaller supports code-signing (Windows), eggs, hidden imports, single executable, single directory, and lots more! (more…)