之前的有些乱。现重新编排一下过程。
环境搭建:
操作系统 fedora 26,python3版本。
@1>> qt用来编译pyqt5。从镜像中下载了此版本。直接安装界面省事。下载之后需要更改一下权限,不然没法运行。
qt-opensource-linux-x64-5.7.0.run
@2>> sip 下载
root下
python configure.py make make install*make的时候可能会报错。
siplib.c:20:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. Makefile:29: recipe for target 'siplib.o' failed make[1]: *** [siplib.o] Error 1 make[1]: Leaving directory '/home/mt/software/sip-4.18.1/siplib' Makefile:3: recipe for target 'all' failed make: *** [all] Error 2需要安装一下python3-pyqt5的开发环境。
dnf install python3-PyQt5*
dnf install python3-PyQt4* 也安装一下吧。
参考
https://*.com/questions/7119844/importerror-no-module-named-pyqt4-qtcore
@3>> pyqt5 下载
python configure.py 省略命令见下面 make make install
下载之后用qmake编译pyqt5。
python configure.py -q /home/mt/Qt5.7.0/5.7/gcc_64/bin/qmake找到qmake的安装路径。
接下来就make && make install。
@4 安装QScintilla下载
把qmake命令放到.bashrc文件中。追加到PATH变量后。参考以下文章。
https://jingyan.baidu.com/article/19192ad80cc817e53e57072e.html
root下执行。
A.安装本体: ~$ cd Qt4Qt5 ~$ qmake qscintilla.pro ~$ make ~$ make install B.安装Designer: ~$ cd ../designer-Qt4Qt5 ~$ qmake designer.pro ~$ make ~$ make install C.安装Python bingdings: ~$ cd ../Python ~$ python configure.py -qmake /home/******/Qt5.7.0/5.7/gcc_64/bin/qmake
( python configure.py --pyqt=PyQt5 )用此命令重新编译,如果make未通过. ~$ make ~$ make install
说明,执行到python bingdings这一步可能会出现
Error: Unable to create the C++ code.的错误。
需要安装一下 这个包
yum install PyQt4-devel.x86_64
并在下载安装这个包 http://rpmfind.net/linux/rpm2html/search.php?query=python3-PyQt5-devel
http://rpmfind.net/linux/fedora/linux/releases/27/Everything/x86_64/os/Packages/p/python3-qt5-devel-5.9-6.fc27.x86_64.rpm
(我的是fedora27)
@5 下载Eric6 root下执行。
~$ python install.py //安装主程序 ~$ python install-i18n.py //安装中文语言包
如果安装主程序时提示如下错误
hecking dependencies Python Version: 3.6.4 Found PyQt5 Found pyuic5 Sorry, please install QScintilla2 and its PyQt5/PyQt4 wrapper. Error: cannot import name 'Qsci'
再重新安装一下即可。
pip install QScintilla
安装之后在当前用户下执行eric6即可。
关于Eric6的简单使用和配置见此处。
如果运行 eric6 出现
Could not find QtWebEngineProcess
Warning: translation file 'eric6_zh_CN'could not be loaded. Using default. Warning: translation file 'qscintilla_zh_CN'could not be loaded. Using default. BackgroundService listening on: 42393 Could not find QtWebEngineProcess [12048:12048:0408/115644.385518:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid). #0 0x7f53709f30a5 <unknown> #1 0x7f5370a08eca <unknown> #2 0x7f537004bfc3 <unknown> #3 0x7f537004ac3b <unknown> #4 0x7f537004b219 <unknown> #5 0x7f536fc8e93a <unknown> #6 0x7f536fc93e76 <unknown> #7 0x7f536f7b1600 <unknown> #8 0x7f536f7b2b25 <unknown> #9 0x7f536f7a1ee9 <unknown> #10 0x7f536f7a20be QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #11 0x7f53756f3441 <unknown> #12 0x7f53756f3f24 QWebEnginePage::QWebEnginePage() #13 0x7f5375701ebb QWebEngineView::page() #14 0x7f53759283f9 meth_QWebEngineView_page #15 0x7f53819bf37f _PyCFunction_FastCallDict #16 0x7f53819cc8ba <unknown> #17 0x7f53819feaba _PyEval_EvalFrameDefault #18 0x7f538195b505 <unknown> #19 0x7f538195c0cc _PyFunction_FastCallDict #20 0x7f538195c66e _PyObject_FastCallDict #21 0x7f5381966741 _PyObject_Call_Prepend #22 0x7f538195caab PyObject_Call #23 0x7f53819c2e89 <unknown> #24 0x7f53819bf8ee <unknown> #25 0x7f538195c494 _PyObject_FastCallDict #26 0x7f53819cc9ed <unknown> #27 0x7f53819feaba _PyEval_EvalFrameDefault #28 0x7f538195b68d <unknown> #29 0x7f538198e89f <unknown> #30 0x7f53819cc97e <unknown> #31 0x7f53819feaba _PyEval_EvalFrameDefault #32 0x7f538195b505 <unknown> #33 0x7f538195c0cc _PyFunction_FastCallDict #34 0x7f538195c66e _PyObject_FastCallDict #35 0x7f5381966741 _PyObject_Call_Prepend #36 0x7f538195caab PyObject_Call #37 0x7f53819c2e89 <unknown> #38 0x7f53819bf8ee <unknown> #39 0x7f538195c494 _PyObject_FastCallDict #40 0x7f53819cc9ed <unknown> #41 0x7f53819feaba _PyEval_EvalFrameDefault #42 0x7f538198e66a <unknown> #43 0x7f53819cc97e <unknown> #44 0x7f53819feaba _PyEval_EvalFrameDefault #45 0x7f538198e66a <unknown> #46 0x7f53819cc97e <unknown> #47 0x7f53819feaba _PyEval_EvalFrameDefault #48 0x7f538195b505 <unknown> #49 0x7f538195c0cc _PyFunction_FastCallDict #50 0x7f538195c66e _PyObject_FastCallDict #51 0x7f53819667ab _PyObject_Call_Prepend #52 0x7f538195caab PyObject_Call #53 0x7f53819c2e89 <unknown> #54 0x7f53819bf8ee <unknown> #55 0x7f538195c494 _PyObject_FastCallDict #56 0x7f53819cc9ed <unknown> #57 0x7f53819feaba _PyEval_EvalFrameDefault #58 0x7f538198e66a <unknown> #59 0x7f53819cc97e <unknown> #60 0x7f53819feaba _PyEval_EvalFrameDefault #61 0x7f53819d99e8 PyEval_EvalCodeEx Received signal 6 #0 0x7f53709f30a5 <unknown> #1 0x7f536f734141 <unknown> #2 0x7f53709f343d <unknown> #3 0x7f53816321b0 <unknown> #4 0x7f5380b4c660 __GI_raise #5 0x7f5380b4dc41 __GI_abort #6 0x7f53709f2dc5 <unknown> #7 0x7f5370a091ed <unknown> #8 0x7f537004bfc3 <unknown> #9 0x7f537004ac3b <unknown> #10 0x7f537004b219 <unknown> #11 0x7f536fc8e93a <unknown> #12 0x7f536fc93e76 <unknown> #13 0x7f536f7b1600 <unknown> #14 0x7f536f7b2b25 <unknown> #15 0x7f536f7a1ee9 <unknown> #16 0x7f536f7a20be QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #17 0x7f53756f3441 <unknown> #18 0x7f53756f3f24 QWebEnginePage::QWebEnginePage() #19 0x7f5375701ebb QWebEngineView::page() #20 0x7f53759283f9 meth_QWebEngineView_page #21 0x7f53819bf37f _PyCFunction_FastCallDict #22 0x7f53819cc8ba <unknown> #23 0x7f53819feaba _PyEval_EvalFrameDefault #24 0x7f538195b505 <unknown> #25 0x7f538195c0cc _PyFunction_FastCallDict #26 0x7f538195c66e _PyObject_FastCallDict #27 0x7f5381966741 _PyObject_Call_Prepend #28 0x7f538195caab PyObject_Call #29 0x7f53819c2e89 <unknown> #30 0x7f53819bf8ee <unknown> #31 0x7f538195c494 _PyObject_FastCallDict #32 0x7f53819cc9ed <unknown> #33 0x7f53819feaba _PyEval_EvalFrameDefault #34 0x7f538195b68d <unknown> #35 0x7f538198e89f <unknown> #36 0x7f53819cc97e <unknown> #37 0x7f53819feaba _PyEval_EvalFrameDefault #38 0x7f538195b505 <unknown> #39 0x7f538195c0cc _PyFunction_FastCallDict #40 0x7f538195c66e _PyObject_FastCallDict #41 0x7f5381966741 _PyObject_Call_Prepend #42 0x7f538195caab PyObject_Call #43 0x7f53819c2e89 <unknown> #44 0x7f53819bf8ee <unknown> #45 0x7f538195c494 _PyObject_FastCallDict #46 0x7f53819cc9ed <unknown> #47 0x7f53819feaba _PyEval_EvalFrameDefault #48 0x7f538198e66a <unknown> #49 0x7f53819cc97e <unknown> #50 0x7f53819feaba _PyEval_EvalFrameDefault #51 0x7f538198e66a <unknown> #52 0x7f53819cc97e <unknown> #53 0x7f53819feaba _PyEval_EvalFrameDefault #54 0x7f538195b505 <unknown> #55 0x7f538195c0cc _PyFunction_FastCallDict #56 0x7f538195c66e _PyObject_FastCallDict #57 0x7f53819667ab _PyObject_Call_Prepend #58 0x7f538195caab PyObject_Call #59 0x7f53819c2e89 <unknown> #60 0x7f53819bf8ee <unknown> #61 0x7f538195c494 _PyObject_FastCallDict r8: 0000000000000000 r9: 00007ffec8300b10 r10: 0000000000000008 r11: 0000000000000246 r12: 00007ffec8300d90 r13: 00000000000000ac r14: 00007ffec8300fc0 r15: 00007ffec8301730 di: 0000000000000002 si: 00007ffec8300b10 bp: 00007f537902ad40 bx: 0000000000000006 dx: 0000000000000000 ax: 0000000000000000 cx: 00007f5380b4c660 sp: 00007ffec8300b10 ip: 00007f5380b4c660 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated. [mt@192 eric6-18.01]$ eric6 Warning: translation file 'eric6_zh_CN'could not be loaded. Using default. Warning: translation file 'qscintilla_zh_CN'could not be loaded. Using default. BackgroundService listening on: 33329 Could not find QtWebEngineProcess [12299:12299:0408/120015.763657:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid). #0 0x7f9e771c40a5 <unknown> #1 0x7f9e771d9eca <unknown> #2 0x7f9e7681cfc3 <unknown> #3 0x7f9e7681bc3b <unknown> #4 0x7f9e7681c219 <unknown> #5 0x7f9e7645f93a <unknown> #6 0x7f9e76464e76 <unknown> #7 0x7f9e75f82600 <unknown> #8 0x7f9e75f83b25 <unknown> #9 0x7f9e75f72ee9 <unknown> #10 0x7f9e75f730be QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #11 0x7f9e7bec4441 <unknown> #12 0x7f9e7bec4f24 QWebEnginePage::QWebEnginePage() #13 0x7f9e7bed2ebb QWebEngineView::page() #14 0x7f9e7c0f93f9 meth_QWebEngineView_page #15 0x7f9e8819037f _PyCFunction_FastCallDict #16 0x7f9e8819d8ba <unknown> #17 0x7f9e881cfaba _PyEval_EvalFrameDefault #18 0x7f9e8812c505 <unknown> #19 0x7f9e8812d0cc _PyFunction_FastCallDict #20 0x7f9e8812d66e _PyObject_FastCallDict #21 0x7f9e88137741 _PyObject_Call_Prepend #22 0x7f9e8812daab PyObject_Call #23 0x7f9e88193e89 <unknown> #24 0x7f9e881908ee <unknown> #25 0x7f9e8812d494 _PyObject_FastCallDict #26 0x7f9e8819d9ed <unknown> #27 0x7f9e881cfaba _PyEval_EvalFrameDefault #28 0x7f9e8812c68d <unknown> #29 0x7f9e8815f89f <unknown> #30 0x7f9e8819d97e <unknown> #31 0x7f9e881cfaba _PyEval_EvalFrameDefault #32 0x7f9e8812c505 <unknown> #33 0x7f9e8812d0cc _PyFunction_FastCallDict #34 0x7f9e8812d66e _PyObject_FastCallDict #35 0x7f9e88137741 _PyObject_Call_Prepend #36 0x7f9e8812daab PyObject_Call #37 0x7f9e88193e89 <unknown> #38 0x7f9e881908ee <unknown> #39 0x7f9e8812d494 _PyObject_FastCallDict #40 0x7f9e8819d9ed <unknown> #41 0x7f9e881cfaba _PyEval_EvalFrameDefault #42 0x7f9e8815f66a <unknown> #43 0x7f9e8819d97e <unknown> #44 0x7f9e881cfaba _PyEval_EvalFrameDefault #45 0x7f9e8815f66a <unknown> #46 0x7f9e8819d97e <unknown> #47 0x7f9e881cfaba _PyEval_EvalFrameDefault #48 0x7f9e8812c505 <unknown> #49 0x7f9e8812d0cc _PyFunction_FastCallDict #50 0x7f9e8812d66e _PyObject_FastCallDict #51 0x7f9e881377ab _PyObject_Call_Prepend #52 0x7f9e8812daab PyObject_Call #53 0x7f9e88193e89 <unknown> #54 0x7f9e881908ee <unknown> #55 0x7f9e8812d494 _PyObject_FastCallDict #56 0x7f9e8819d9ed <unknown> #57 0x7f9e881cfaba _PyEval_EvalFrameDefault #58 0x7f9e8815f66a <unknown> #59 0x7f9e8819d97e <unknown> #60 0x7f9e881cfaba _PyEval_EvalFrameDefault #61 0x7f9e881aa9e8 PyEval_EvalCodeEx Received signal 6 #0 0x7f9e771c40a5 <unknown> #1 0x7f9e75f05141 <unknown> #2 0x7f9e771c443d <unknown> #3 0x7f9e87e031b0 <unknown> #4 0x7f9e8731d660 __GI_raise #5 0x7f9e8731ec41 __GI_abort #6 0x7f9e771c3dc5 <unknown> #7 0x7f9e771da1ed <unknown> #8 0x7f9e7681cfc3 <unknown> #9 0x7f9e7681bc3b <unknown> #10 0x7f9e7681c219 <unknown> #11 0x7f9e7645f93a <unknown> #12 0x7f9e76464e76 <unknown> #13 0x7f9e75f82600 <unknown> #14 0x7f9e75f83b25 <unknown> #15 0x7f9e75f72ee9 <unknown> #16 0x7f9e75f730be QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #17 0x7f9e7bec4441 <unknown> #18 0x7f9e7bec4f24 QWebEnginePage::QWebEnginePage() #19 0x7f9e7bed2ebb QWebEngineView::page() #20 0x7f9e7c0f93f9 meth_QWebEngineView_page #21 0x7f9e8819037f _PyCFunction_FastCallDict #22 0x7f9e8819d8ba <unknown> #23 0x7f9e881cfaba _PyEval_EvalFrameDefault #24 0x7f9e8812c505 <unknown> #25 0x7f9e8812d0cc _PyFunction_FastCallDict #26 0x7f9e8812d66e _PyObject_FastCallDict #27 0x7f9e88137741 _PyObject_Call_Prepend #28 0x7f9e8812daab PyObject_Call #29 0x7f9e88193e89 <unknown> #30 0x7f9e881908ee <unknown> #31 0x7f9e8812d494 _PyObject_FastCallDict #32 0x7f9e8819d9ed <unknown> #33 0x7f9e881cfaba _PyEval_EvalFrameDefault #34 0x7f9e8812c68d <unknown> #35 0x7f9e8815f89f <unknown> #36 0x7f9e8819d97e <unknown> #37 0x7f9e881cfaba _PyEval_EvalFrameDefault #38 0x7f9e8812c505 <unknown> #39 0x7f9e8812d0cc _PyFunction_FastCallDict #40 0x7f9e8812d66e _PyObject_FastCallDict #41 0x7f9e88137741 _PyObject_Call_Prepend #42 0x7f9e8812daab PyObject_Call #43 0x7f9e88193e89 <unknown> #44 0x7f9e881908ee <unknown> #45 0x7f9e8812d494 _PyObject_FastCallDict #46 0x7f9e8819d9ed <unknown> #47 0x7f9e881cfaba _PyEval_EvalFrameDefault #48 0x7f9e8815f66a <unknown> #49 0x7f9e8819d97e <unknown> #50 0x7f9e881cfaba _PyEval_EvalFrameDefault #51 0x7f9e8815f66a <unknown> #52 0x7f9e8819d97e <unknown> #53 0x7f9e881cfaba _PyEval_EvalFrameDefault #54 0x7f9e8812c505 <unknown> #55 0x7f9e8812d0cc _PyFunction_FastCallDict #56 0x7f9e8812d66e _PyObject_FastCallDict #57 0x7f9e881377ab _PyObject_Call_Prepend #58 0x7f9e8812daab PyObject_Call #59 0x7f9e88193e89 <unknown> #60 0x7f9e881908ee <unknown> #61 0x7f9e8812d494 _PyObject_FastCallDict r8: 0000000000000000 r9: 00007fffd2039650 r10: 0000000000000008 r11: 0000000000000246 r12: 00007fffd20398d0 r13: 00000000000000ac r14: 00007fffd2039b00 r15: 00007fffd203a270 di: 0000000000000002 si: 00007fffd2039650 bp: 00007f9e7f7fbd40 bx: 0000000000000006 dx: 0000000000000000 ax: 0000000000000000 cx: 00007f9e8731d660 sp: 00007fffd2039650 ip: 00007f9e8731d660 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated.
参考
https://trac.osgeo.org/osgeo4w/ticket/564
dnf install qt5-devel-5.9.4-2.fc27.noarch