[PyQt] Comppiling QScintilla with python 3.2

Hans-Peter Jansen hpj at urpla.net
Wed Jun 15 06:45:08 BST 2011


On Wednesday 15 June 2011, 03:04:32 Algis Kabaila wrote:
> After  long trepidation, I started moving my python scripts from python
> 2.x to python 3.2.
>
> Pleasant surprise - sip-4.12.3 and PyQt-x11-gpl-4.8.4 compiled without
> problems!
>
> Python 3.2 IDLE does not work well with this version of PyQt. Anyway,
> eric 5.x would be better, so it is necessary to install python 3 version
> of QScintilla. Downloaded QScintilla-gpl-2.5.1.tar.gz, expanded the tar
> ball and attempted to compile:
>
> Changed the current dir to QScintilla-gpl-2.5.1/Python/ and tried the
> first step:
>
> $ python3.2 configure.py
>
> It immediately responded with the message:
>
> "Qsci/qsciglobal.h could not be found in /usr/include/qt4.  If QScintilla
> is installed then use the -n argument to explicitly specify the correct
> directory."

You need to compile and install the qscintilla C++ lib before generating the 
python wrappers:

pushd Qt4
qmake qscintilla.pro
sudo make install
popd

> I am using a freshly installed kubuntu 11.04 "natty" OS and had a python
> 2.x version of QScintilla installed from ubuntu binaries.  I thought that
> the message may simply be because of the installed binaries, so
> "completely removed" the installed QScintilla with the aid of "synaptic"
> program and tried to repeat the first step of compilation.  It  failed
> again with an identical message.  I suspect I am doing  someting wrong,
> but what?
>
> So where do I go from here?

Al, manually compiling stuff like this should be done as the last resort 
only.

One of the most compelling reasons to use Linux is the distributions package 
manager. OTOH, mixing that with manual builds is the source for many 
strange failures. 

My advice is: go through the hassle of building packages for your 
distribution. Even better, as far as I know, Ubuntu has something similar 
to openSUSE build service, or you might want to use that, since it is able 
to create ubuntu builds, too.  

Just needing the packages on a second system will pay off for the initial 
hassle. Guaranteed.

Pete


More information about the PyQt mailing list