Python Bindings for KDE (PyKDE-3.15)
Prev |  | Next

# Installation

These docs only cover installing PyKDE from source (ie building and compiling PyKDE). You should read the "Testing" section at the end of this page even if installing from RPMs. RPM installs also have the same System Requirements as noted in the next section.

Before reporting bugs, please read the Troubleshooting and build.py Options pages.

## System Requirements

PyKDE only runs on Linux or other Unix-based systems. The usual tools (compiler, linker, make, etc) are required. In addition you need:

sip
  sip must be installed. sip is the bindings code generator and run-time lib for PyKDE. You can get it here
PyQt
  PyQt must be installed Just as KDE depends on Qt, PyKDE depends on PyQt. If you don't already have PyQt installed, you can get it here

NOTE: sip, PyQt, and PyKDE must be compatible versions (the PyKDE build script will test for this). That means if you are installing PyKDE-3.15, you must have installed:

- sip-x11-gpl-4.2.0 or later (earlier sip 4 versions may work, but are untested)
- PyQt-x11-gpl-3.13 or later

Of course you must also have Python (version 2.2 or later), KDE (any KDE 3.0 - 3.5 version) and Qt (any version from 3.0 through 3.3) installed. PyKDE no longer supports KDE1 or KDE2.

#### If PyQt was installed from an RPM ---

If you have installed sip and PyQt from binaries, to build PyKDE you must have the sipconfig.py and pyqtconfig.py files (suitable for your environment) installed. These are in the same location as the PyQt files (usually python/site-packages). These config files are generated automatically if you build/compile sip and PyQt from source.

PyKDE also requires the PyQt sip files to build and compile. If you installed PyQt from an RPM, you also need to have installed the corresponding "PyQt-devel" RPM, which contains the PyQt sip files.

## Installing from source code

Unpack the PyKDE tarball to a directory you have write access to. /usr/local is a good choice if you have write access or can obtain it. Some place in your home directory is also a good choice. I'll assume /usr/local for these instructions.

Change to the PyKDE directory (eg "cd /usr/local/PyKDE-3.15" or whatever the complete version of the downloaded PyKDE package was).

At a command line prompt (as a user, not as root), enter:

        python configure.py

configure.py will check your system to locate Python and releated files, Qt, KDE, sip and PyQt. It will also run several tests, and then begin generating the C++ code and make files for PyKDE. The entire process should take about 2 to 10 minutes depending on your computer's speed and available memory. configure.py will report its progress throughout its run. If errors occur, see the sections on troubleshooting below.

After configure.py has run to completion successfully, you next need to compile PyKDE. Simply type:

        make

PyKDE takes anywhere from 15 minutes to over an hour to compile, depending on the speed of your computer, available memory, and other tasks running. Once PyKDE has compiled, do:

        su -c"make install"

Your system will ask for your root password, and if entered correctly will proceed to install PyKDE.

## File concatention

If your computer has 256MB or more of memory, you will probably benefit from "file concatenation". When generating C++ files, sip can generate either a single file for each class in a module, or a single huge file that contains all classes in the module. The latter is the "concatenated" version.

As long as swapping doesn't occur and memory isn't exhausted, the concatenated files will compile up to 80% faster than individual files. However, some hardware and some gcc versions are not compatible with the large concatenated files. You can control whether sip concatenates files by passing either the -i switch (concatenation off) or -c switch (concatenation on) to configure.py.

configure.py is currently programmed to detect the gcc version being used, and will turn on concatenation for gcc earlier than 4.0 and turn off concatentation for gcc 4.0 or later. You can override this automatic choice with -i or -c as needed.

## Testing the installation

There are a number of things you can do to test your installation. The simplest test that also covers the most common errors is (still in the top level PyKDE directory):

        python importTest.py

If you get errors running this test, see the troubleshooting section below.

There are also sample programs you can run (which also test some of PyKDE's features) in the examples/ and templates/ subdirectories.

Prev | Home | Next
Introduction |  | Troubleshooting