Arch Linux and PyQwt installation

Some things that we take for granted on other distributions, seem to take a bit of work on Arch Linux. Basically is because that Arch Linux is more or less a bleeding edge distribution, and some packages lag behind in that continuous update cycle .

So I needed to use python to do some plotting with the QwtPlot widget available at the Qwt library. To use the Qwt widgets  from python, we need the Python bindings PyQwt.  The problem with this is that installing PyQwt from AUR uses the deprecated build system based on the script and the pqtconfig object that no longer exists on the most recent version of PyQT on Arch Linux.

So when we try to install PyQwt from Arch Linux AUR repository, the following error happens:

Requires at least PyQt-4.2 and its development tools.

An the installation fails. This is due to the missing pqtconfig python module. We can see that by running python and executing the following line:

import pyqtconfig as pyqtconfig

This error can be seen a fault of either: PyQwt hasn’t had no updates for the new PyQt releases, or PyQt, in it’s newest version, didn’t keep backward compatibility.

The fact is that it seems that is the PyQt package on Arch Linux that didn’t keep that backward compatibility, by dropping out the pqtconfig class/object on the package installation. Who knows…

This blog entry: has the solution and it solves the issue with the PyQt package by installing the missing module.

Just build PyQT from sources, and at the end just copy the missing module.

  1. Download PyQt from
  2. Extract the package at a temporary directory
  3. Build it: python2 -v /usr/share/sip –qsci-api -q /usr/bin/qmake-qt4 
  4. Install the missing module: sudo install -m644 /usr/lib/python2.7/site-packages/PyQt4/

From that point, installing PyQwt from AUR works just fine.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s