Download PYQT's source code from official website:
Official online said: "Before you can build PyQt4 you must has already built and installed SIP" means that you must first install SIP, so also download sip.
Decompression SIP compressed packet, enter the source directory, open the Readme, said is the current directory has a build.py, the results I did not find. But a configure.py code was found. So I executed it.
Completed normally, and generated a makefile. I subconsciously performed make, and the result:
-c -pipe -fPIC -O2 -w -DNDEBUG -I. -I
.6 -o siplib.o siplib.c
siplib.c:20:20: fatal error: Python.h: No such
: *** [siplib.o] Error 1
: Leaving directory `
: *** [all] Error 2
Usually this problem in the system does not install the components of the Development Board, only provides the library files, and does not provide the corresponding header files, can not be developed two times. The solution file is to install Python-devel
Complete the installation. Make again, and pass the compilation successfully. Then sudo make install, also very smooth. To test whether the installation is complete:
$ sip -h
sip [-h] [-V] [-a
] [-e] [-g] [-I
#] [-k] [-m file] [-o] [-p module] [-P] [-r] [-s suffix] [-t tag] [-T] [-w] [-x feature] [-X id:file] [-z file] [file]
-h display this help message
-V display the sip version number
the name of the QScintilla API
[default not generated]
the name of the build
[default none generated]
the name of the code directory [default not generated]
the name of the documentation
(deprecated) [default not generated]
exceptions [default disabled]
-g always release and reacquire the GIL [default only when specified]
this directory when including files
# split the generated code into # files [default 1 per class]
-k support keyword arguments
functions and methods
the name of the XML
[default not generated]
the automatic generation of docstrings [default disabled]
-p module the name of the consolidated module that this is a component of
-r generate code with tracing enabled [default disabled]
-s suffix the suffix to use
C or C++
-t tag the version
to generate code
-T disable the timestamp
the header of generated files
-x feature this feature is disabled
create the extracts
the name of a
the name of the specification
Unzipped downloaded: pyqt-x11-gpl-4.10.3.tar.gz
Enter the source directory, open the Readme, follow the instructions: Execute the configure-ng.py script first, then Make,make install.
$ python configure-ng.py
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
This is the GPL version of PyQt 4.10.3 (licensed under the GNU General Public
Python 2.6.6 on linux2.
to view the GPL v2 license.
to view the GPL v3 license.
to accept the terms of the license.
to decline the terms of the license.
Do you accept the terms of the license?
Since this is the GPL, let us agree to the agreement when executing the configure-ng.py. Enter Yes to continue.
1min completed successfully! Then make, the process was a little long and took 20 minutes and went well.
Linux under the source installation PyQt4