Chapter 2. Installation

Table of Contents
Installing BlackAdder
Installing sip and PyQt without BlackAdder

In this chapter I briefly describe how to install BlackAdder on Windows and Linux. After that, compiling PyQt from source is described in a little more detail.

Of course, a book generally has a longer life than a certain version of a software package, so installation details might have changed between time of writing and time of buying—so don't forget to read the README files!

Installing BlackAdder

PyQt can be used on Windows, Unix/X11 and soon OS X, but BlackAdder is only available for Windows and Unix/X11 (due to licensing restrictions).

Windows

To install BlackAdder on Windows you need the following components:

  • Python. (Be careful to choose the version of Python that is right for your version of BlackAdder.)

  • BlackAdder.

  • The BlackAdder Qt module.

  • And eventually, the Egenix MX ODBC module, if you want to do database work.

Now it's simply a matter of installing the components, one after another. Every component is provided in a comfortable Windows installer package.

Installing BlackAdder

BlackAdder will now be ready to run — a friendly icon has appeared on your desktop, just begging to be clicked.

Linux

There are rpm packages for a lot of distributions: Mandrake, RedHat and SuSE. Additionally, there is a .tgz package for Slackware.

Installing BlackAdder does not differ from installing any other package for your favorite distribution — you can use a fancy gui like KPackage, or type

boud@calcifer:~/tmp > rpm --install BA-personal-1.0Beta3-1_tkc_suse71.i386.rpm
      

on the command line, if you're installing the 3.1 beta for SuSE Linux. The actual name of the rpm will vary, of course.

KPackage with the BlackAdder rpm

Additionally, you might want to set two environment variables in your .bashrc file. Installing BlackAdder and Python in the default location isn't necessary, but if you deviate from the standard BlackAdder installation directory, you need to set the following variables.

export BLACKADDERDIR=/usr/lib/BlackAdder export
BLACKADDERPYTHON=/usr/local/bin/python
      

Now, simply typing "ba" on the command line will start BlackAdder.