设为首页 加入收藏

TOP

Mac OS X 10.11.1下搭建Python3.4 + PyQt5.5.1 +Eric6.1.1开发平台(三)
2017-10-11 15:02:02 】 浏览:10429
Tags:Mac 10.11.1 搭建 Python3.4 PyQt5.5.1 Eric6.1.1 开发平台
la/Python
1 cd /QScintilla-gpl-2.9.1/Python
2 python3 configure.py --pyqt=PyQt5-d /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyQt5--pyqt-sipdir=/Library/Frameworks/Python.framework/Versions/3.4/share/sip/PyQt5-v /Library/Frameworks/Python.framework/Versions/3.4/share/sip/PyQt5
3 make && date
4 sudo make install && date

 

如果在Python里import不会报错,即代表安装成功,可继续往下进行

1 python3
2 Python3.4.4(v3.4.4:737efcadf5a6,Dec192015,20:38:52)
3 [GCC 4.2.1(AppleInc. build 5666)(dot 3)] on darwin
4 Type"help","copyright","credits" or "license"for more information.
5 >>> import PyQt5.Qsci
6 >>> exit()

 

7.安装QScintilla/designer-Qt4Qt5        
1 cd /QScintilla-gpl-2.9.1/designer-Qt4Qt5
2 qmake designer.pro
3 make && date
4 sudo make install && date

 

8.安装Eric6

下载地址:http://sourceforge.net/projects/eric-ide/files/eric6/stable/

下载其中的eric6-6.1.1.tar主文件和eric6-i18n-zh_CN.GB2312-6.1.1.tar中文语言包。

将两个文件提取出来,将中文语音包的eric复制到主文件内合并

1 cd eric6-6.1.1
2 sudo python3 install.py 

 

配置Eric6

1、选择Eric6-> preference -> Editor -> Autocompation。勾选所有选框;

2.Editor -> QScintilla 。勾上左右的两个选框,然后在下面source中,选择from Document and API files;

3.Editor -> APIs。勾选Complie APIs Autocompation,在Language中,选择python3。点面下面的Add from installed APIs按钮,选择住需要的.api文件。最后点击Compile APIs;

4、Interface -> Interface。Language选择中文,重启生效。

大功告成!

三、曾经遇到的问题

1.安装QScintilla designer-Qt4Qt5时报错!

 

1 root@kallan:/media/kallan/D盘/编程学习/python/QScintilla-gpl-2.9.1/designer-Qt4Qt5# qmake -qt5 designer.pro Project ERROR: Unknown module(s) in QT: designer

 

 

 

原因: Qt没有安装好

2.安装QScintilla Python时报错!
1 python3 configure.py --pyqt=PyQt5-d /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyQt5--pyqt-sipdir=/Library/Frameworks/Python.framework/Versions/3.4/share/sip/PyQt5--qsci-sipdir=/Library/Frameworks/Python.framework/Versions/3.4/share/sip/PyQt5
2 Error:Make sure you have a working sip on your PATH or use the --sip argument
3 to explicitly specify a working sip.

 

原因:没有安装SIP

3.安装QScintilla Python时报错!
 1 python3 configure.py --pyqt=PyQt5
 2 ConfiguringQScintilla2.9.1...
 3 QScintilla2.9.1 is being used.
 4 TheQScintilla.sip files will be installed in/usr/share/sip/PyQt5.
 5 TheQScintilla module will be installed in
 6 /usr/lib/python3/dist-packages/PyQt5.
 7 PyQt5.3.1 is being used.
 8 Qt5.3.1 is being used.
 9 sip 4.16.2 is being used.
10 The sip executable is /usr/bin/sip.
11 TheQScintilla module is being built with 'protected' redefined as 'public'.
12 TheQScintilla API file will be installed in/usr/share/qt5/qsci/api/python.
13 Generating the C++ source for the Qsci module...
14 Error:Unable to create the C++ code.

 

原因:安装顺序错误——先安装的PyQt5,而后安装的QScintilla Qt4Qt5

4.QScintilla的Python安装完成但是在Python中import时报错!
1 >>> import PyQt5.Qsci
2 Traceback(most recent call last):
3 File"<stdin>", line 1,in<module>
4 ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyQt5/Qsci.so,2):Libr
首页 上一页 1 2 3 4 下一页 尾页 3/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇在mac上截屏的几种方式 下一篇Mac 开发者常用的工具

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目