centos7 下搭建Python2.7 + PyQt4.11.3 + Eric4.0开发平台
2015-12-30 17:38
507 查看
感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正!
如果转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
原博文地址:http://blog.csdn.net/qq_21398167/article/details/50435976
centos7默认安装了Python2.7 。故Python2.7的安装可略去
# tar -zxvf qt-everywhere-opensource-src-4.8.7.tar
# cd qt-everywhere-opensource-src-4.8.7
# ./configure
# make
# make install
将/usr/bin下的qmake软连接到/opt/Qt/5.3/gcc/bin/qmake上
ln -s /usr/local/Trolltech/Qt-4.8.7/bin/qmake /usr/bin/qmake
官网上说:“Before you can build PyQt4 you must have already built and installed SIP” 意思是说必须先安装SIP,于是也下载了SIP。
解压SIP压缩包,进入源码目录,打开README,说是当前目录下有一个build.py,结果我没有找到。但找到了一个configure.py的代码。于是我执行它
正常完成,并生成了Makefile。我下意识地执行make,结果:
通常这种问题出在系统没有安装组件的开发板,只提供了库文件,并没有提供对应的头文件,不能进行二次开发。解决文件就是安装python-devel
完成安装。再make,顺利通过编译。再sudo make install,也很顺利。
解压下载的:PyQt-x11-gpl-4.10.3.tar.gz
进入源码目录,打开README,按说明的步骤:先执行configure.py脚本,然后make,make install。
因为我在使用 eric4 的时候 出现错误
ImportError: No module named QtWebKit
原因是在编译 PyQt 的时候 没有安装 QtWebKit 导致没有编译那个模块
所以在编译之前 yum install qtwebkit
由于这是GPL,所以在执行configure.py时让我们同意协议。输入yes继续。
用了1min顺利完成!接着make,这个过程有一点长,花了20分钟,很顺利。
# tar -xzvf QScintilla-gpl-2.8.4.tar.gz
# cd QScintilla-gpl-2.8.4
1.安装本体
# cd Qt4Qt5
# qmake qscintilla.pro
# sudo make make install
2.安装designer
# cd ../designer-Qt4Qt5
# qmake designer.pro
# sudo make
# sudo make install
3.安装python bingdings
# cd ../Python
# python3 configure.py
# sudo make
# sudo make install
中文包 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 //语言包文件会自动解压到Eric6.0主文件解压目录中
# cd eric6-6.0-snapshot-20140720
# sudo python3 install.py //安装主程序
# sudo python3 install-i18n.py //安装中文语言包
# sudo eric4 运行
1、选择Settings -> preference -> Editor -> Autocompation。勾选所有选框;
2、选择Settings -> preference -> Editor -> QScintilla 。勾上左右的两个选框,然后在下面source中,选择from Document and API files;
3、选择Settings -> preference -> Editor -> APIs。勾选Complie APIs Autocompation,在Language中,选择python3。点面下面的Add from installed APIs按钮,选择住需要的.api文件。最后点击Compile
APIs;
4、选择Settings -> preference -> Interface -> Interface。右侧Language根据喜好选择中文或者English。重启生效。
配置完成。
如果转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
原博文地址:http://blog.csdn.net/qq_21398167/article/details/50435976
安装Python2.7
centos7默认安装了Python2.7 。故Python2.7的安装可略去安装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
将/usr/bin下的qmake软连接到/opt/Qt/5.3/gcc/bin/qmake上
ln -s /usr/local/Trolltech/Qt-4.8.7/bin/qmake /usr/bin/qmake
安装SIP
版本 sip-4.16.7.tar官网上说:“Before you can build PyQt4 you must have already built and installed SIP” 意思是说必须先安装SIP,于是也下载了SIP。
解压SIP压缩包,进入源码目录,打开README,说是当前目录下有一个build.py,结果我没有找到。但找到了一个configure.py的代码。于是我执行它
安装PyQt4
版本 PyQt-x11-gpl-4.11.3.tar解压下载的:PyQt-x11-gpl-4.10.3.tar.gz
进入源码目录,打开README,按说明的步骤:先执行configure.py脚本,然后make,make install。
因为我在使用 eric4 的时候 出现错误
ImportError: No module named QtWebKit
原因是在编译 PyQt 的时候 没有安装 QtWebKit 导致没有编译那个模块
所以在编译之前 yum install qtwebkit
用了1min顺利完成!接着make,这个过程有一点长,花了20分钟,很顺利。
安装QScintilla2
版本 QScintilla-gpl-2.9.tar# tar -xzvf QScintilla-gpl-2.8.4.tar.gz
# cd QScintilla-gpl-2.8.4
1.安装本体
# cd Qt4Qt5
# qmake qscintilla.pro
# sudo make make install
2.安装designer
# cd ../designer-Qt4Qt5
# qmake designer.pro
# sudo make
# sudo make install
3.安装python bingdings
# cd ../Python
# python3 configure.py
# sudo make
# sudo make install
安装Eric4
版本 eric4-4.5.25.tar中文包 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 //语言包文件会自动解压到Eric6.0主文件解压目录中
# cd eric6-6.0-snapshot-20140720
# sudo python3 install.py //安装主程序
# sudo python3 install-i18n.py //安装中文语言包
# sudo eric4 运行
配置过程:
终端输入eric6启动:1、选择Settings -> preference -> Editor -> Autocompation。勾选所有选框;
2、选择Settings -> preference -> Editor -> QScintilla 。勾上左右的两个选框,然后在下面source中,选择from Document and API files;
3、选择Settings -> preference -> Editor -> APIs。勾选Complie APIs Autocompation,在Language中,选择python3。点面下面的Add from installed APIs按钮,选择住需要的.api文件。最后点击Compile
APIs;
4、选择Settings -> preference -> Interface -> Interface。右侧Language根据喜好选择中文或者English。重启生效。
配置完成。
相关文章推荐
- python和pyqt实现360的CLable控件
- Python中使用PyQt把网页转换成PDF操作代码实例
- 解决windows下Sublime Text 2 运行 PyQt 不显示的方法分享
- CEF是什么?
- pyqt sqlite3 icu fts3 fts4 enabled 。全文搜索 功能
- PyQt 实战:简易便签软件的制作
- 如何使用好pyqt的signal和slot
- PySide集成开发环境下载安装配置
- Python GUI问题
- VS2010(64)+Qt4.8.0+PCL1.6.0+Vtk配置显示点云
- Qt4.7.2的移植
- Qt4.7.2在PC上的编译
- Python 图形界面开发环境搭建(Python2.7 + pyQT4 + Eric4)
- QT4.5.2移植MC100环境搭建步骤
- Qt4 对文本的基本操作
- qt对文件的操作
- 在VS2010中集成QT + Qt4.8.2编译MYSQL驱动
- Python学习笔记,我的一个PyQt工程,一:Python是什么鬼?
- Python学习笔记,我的一个PyQt工程,一:Python是什么鬼?
- pyqt 生成代码的调用