[scribus-dev] Using PyQt4 in Scribus Script on Windows XP

Jean Ghali jghali at libertysurf.fr
Mon Apr 18 22:19:36 UTC 2011

Le 16/04/2011 07:13, Brian J. Rohan a écrit :
> Friday, April 15, 2011
> 10:08:35 PM
> Hello. I am currently using a Windows XP machine (32 bit). I am new to Scribus, and have
> enjoyed using it over the other expensive program for desktop publishing. In Scribus I
> have a prewritten script I would like to run. The beginning of the script contains:
> /!/usr/bin/env python
> -- coding: utf-8 --
> from PyQt4.QtCore import * from PyQt4.QtGui import *
> class DockDialog(QDockWidget):
> /
> I have installed Python 3.2 via ActivePython (after trying to install from python.org).
> After the install I then opened a DOS window and typed pymp install pyqt4, which, as far
> as I could tell installed properly. I then tried to run the script in Scribus and received
> the following message:
> /Traceback (most recent call last): File "", line 8, in ? File "C:/Program Files/Scribus
>", line 4, in ? from PyQt4.QtCore
> import * ImportError: No module named PyQt4.QtCore


Scribus is Qt3 based. Qt4 and consequently PyQt4 is not compatible with Qt3. That
script will not work in any case with Scribus 1.3.3.x. You have to download a Qt4 based
version of Scribus, 1.4.0.rc3 for example.

Also Scribus scripter is only compatible with Python 2.x. Python 3.2 is not compatible
with python 2.x and by consequence with scribus scripter. Assuming PyQt4 can run with
Python 2.x (i have no idea if this is the case), you'll have to install it :
- either in scribus python directory as scribus installs a local version of python to
avoid user the burden of installing it
- or to disable scribus python install by deleting the python, dlls and tcl directory in
scribus install dir, then installing a custom python 2.7. Python 2.7 required or scripter
will not run.

Hope that helps,


More information about the scribus-dev mailing list