Build Python2.7 + PyQt4.11.3 + Eric4.0 development platform under CentOS 7
Build Python2.7 + PyQt4.11.3 + Eric4.0 development platform under CentOS 7
Install Python2.7
Python2.7 is installed in CentOS 7 by default. Therefore, the installation of Python2.7 can be omitted.
Install Qt4.8.7
Qt-everywhere-opensource-src-4.8.7.tar
# Tar-zxvf qt-everywhere-opensource-src-4.8.7.tar
# Cd qt-everywhere-opensource-src-4.8.7
#./Configure
# Make
# Make install
Connect qmake in/usr/bin to/opt/Qt/5.3/gcc/bin/qmake.
Ln-s/usr/local/Trolltech/Qt-4.8.7/bin/qmake/usr/bin/qmake
Install SIP
Version sip-4.16.7.tar
The official website said: "Before you can build PyQt4 you must have already built and installed SIP" means that you must install the SIP first, and then download the SIP.
Decompress the SIP package, go to the source code directory, open README, and say there is a build. py under the current directory. I cannot find the result. However, a configure. py code is found. So I executed it.
$ Python configure. py
Normally completed, and a Makefile is generated. I subconsciously execute make. Result:
Gcc-c-pipe-fPIC-O2-w-DNDEBUG-I.-I/usr/include/python2.6-o siplib. o siplib. c
Siplib. c: 20: 20: fatal error: Python. h: No such file or directory
# Include <Python. h>
^
Compilation terminated.
Make [1]: *** [siplib. o] Error 1
Make [1]: Leaving directory '/home/hevake_lcj/Install/qt-downloads/sip-4.15.3/siplib'
Make: *** [all] Error 2
Generally, this problem occurs when the system does not install components on the Development Board. Only the library files are provided, and the corresponding header files are not provided. Secondary Development is not allowed. The solution file is to install python-devel.
$ Sudo yum install python-devel
Complete the installation. Make again and compile it smoothly. Sudo make install again.
Install PyQt4
Version PyQt-x11-gpl-4.11.3.tar
Unzipping download: PyQt-x11-gpl-4.10.3.tar.gz
Go to the source code directory, open README, and follow the instructions to execute the configure. py script, and then make and make install.
Because I encountered an error when using eric4.
ImportError: No module named QtWebKit
The reason is that when compiling PyQt, QtWebKit is not installed, and that module is not compiled.
So before compilation, yum install qtwebkit
$ 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
License) for Python 2.6.6 on linux2.
Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
Do you accept the terms of the license? Yes
Since this is GPL, let us agree to the protocol when executing configure. py. Enter yes to continue.
It took 1 minute to complete successfully! Next, make. This process took 20 minutes and went quite well.
Install QScintilla2
Version QScintilla-gpl-2.9.tar
# Tar-xzvf QScintilla-gpl-2.8.4.tar.gz
# Cd QScintilla-gpl-2.8.4
1. Install the Ontology
# Cd Qt4Qt5
# Qmake qscintilla. pro
# Sudo make install
2. Install designer
# Cd ../designer-Qt4Qt5
# Qmake designer. pro
# Sudo make
# Sudo make install
3. Install python bingdings
# Cd ../Python
# Python3 configure. py
# Sudo make
# Sudo make install
Install Eric4
Version eric4-4.5.25.tar
Chinese pack eric4-i18n-zh_CN.GB2312-4.5.25.tar
# Tar-zxvf eric6-6.0-snapshot-20140720.tar.gz
# Tar-zxvf eric6-i18n-zh_CN.GB2312-6.0-snapshot-20140720.tar.gz // Language Pack files are automatically extracted to the Eric6.0 main file unzipping directory
# Cd eric6-6.0-snapshot-20140720
# Sudo python3 install. py // install the main program
# Sudo python3 install-i18n.py // install the Chinese Language Pack
# Run sudo eric4
Configuration process:
Terminal input eric6 start:
1. Choose Settings> preference> Editor> Autocompation. Select All check boxes;
2. Choose Settings> preference> Editor> QScintilla. Check the two selection boxes left and right, and then select from Document and API files in the source below;
3. Choose Settings> preference> Editor> APIs. Check Complie APIs Autocompation and select python3 in Language. Click the Add from installed APIs button under the dot and select the. api file. Click Compile APIs;
4. Choose Settings> preference> Interface. Select Chinese or English based on your preferences. The restart takes effect.
Configuration complete.
Build Python3.4 + PyQt5.5.1 + Eric6.1.1 development platform under Mac OS X 10.11.1
Build Python3.4 + PyQt5.3.2 + Eric6.0 development platform in Ubuntu 14.04
PyQt details: click here
PyQt: click here
This article permanently updates the link address: