首先我按照以下步骤安装QScintilla:
1:
cd Qt4Qt5 qmake qscintilla.pro sudo make make install
2:
cd ../designer-Qt4Qt5 qmake designer.pro sudo make sudo make install
3:
cd ../Python python3 configure.py --pyqt=PyQt5 sudo make
在这里,我遇到了这个问题:
QAbstractScrollArea: No such file or directory
和问题:
qprinter.h: No such file or directory
但我终于通过手动添加所需文件来解决它们。
继续:
sudo make install
4:
然后我通过键入来安装eric6:
sudo python3 install.py
但是我得到了:
检查依赖关系
Python版本:3.4.0
发现PyQt5
对不起,请安装QScintilla2及其PyQt5 / PyQt4包装。
错误:/usr/lib/python3/dist-packages/PyQt5/Qsci.so:undefined symbol:_ZTI13QsciScintilla
主要的问题是你正在连接Qt4而不是Qt5。 这就是为什么QAbstractScrollArea
和QPrinter
头被报告为缺失,以及为什么后来得到undefined symbol
错误。
QScintilla使用一个功能文件来控制编译时配置,并且需要修补它的源代码以获得Qt5的良好构建。
因此,首先解压缩一组新的数据源,然后进行这些更改:
设计师-Qt4Qt5 / designer.pro :
TARGET = qscintillaplugin_qt5
Qt4Qt5 / features / qscintilla2.prf :
} else { LIBS += -lqscintilla2_qt5 } } } else { LIBS += -lqscintilla2_qt5 }
Qt4Qt5 / qscintilla.pro :
TARGET = qscintilla2_qt5 ... features.path = $$[QT_INSTALL_ARCHDATA]/mkspecs/features
这将确保您获得Qt5独立的qscintilla库。
完成后,按以下步骤构建(作为普通用户):
cd 'path/to/src/Qt4Qt5' # this is essential for correct linking export QMAKEFEATURES="$PWD/features" # make sure you use the right qmake! qmake-qt5 'qscintilla.pro' make # plugin for Qt5 Designer cd '../designer-Qt4Qt5' qmake-qt5 'designer.pro' INCLUDEPATH+='../Qt4Qt5' QMAKE_LIBDIR+='../Qt4Qt5' make # Python bindings cd '../Python' python3 'configure.py' --pyqt='PyQt5' --qmake='/usr/bin/qmake-qt5' \ --qsci-incdir='../Qt4Qt5' --qsci-libdir='../Qt4Qt5' make
如果成功,您可以安装一切(以root身份):
cd 'path/to/src/Qt4Qt5' make install cd '../designer-Qt4Qt5' make install cd '../Python' make install
上面的ekhumoro的解决方案并不适合我 – 让我们只是说,也许我错过了什么,或者这是一个环境特定的事情。
无论如何….我做了ekhumoro建议除了没有编辑这三个文件 :(XXX)
- designer-Qt4Qt5/designer.pro - Qt4Qt5/features/qscintilla2.prf - Qt4Qt5/qscintilla.pro
编辑它们的原因听起来很合理,但在一天结束的时候,Eric安装失败:
Sorry, please install QScintilla2 and its PyQt5/PyQt4 wrapper. Error: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyQt5/Qsci.so, 2): Library not loaded: libqscintilla2_qt5.12.dylib ^^^^ Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyQt5/Qsci.so Reason: image not found
注意用^^^^标记的_qt5 – 理论上应该解决,但是对于我来说它没有。 我尝试了各种各样的东西无济于事。 可能是我对某些设置的无知。
我期望ekhumoro的指令能够工作,因为对3个文件的编辑建议 – 请参阅(XXX) – 配置Make使用_qt5创建库。 我尝试了许多东西 – 符号链接,etcetc,但在一天结束时,忽略(XXX)允许一切正常进行。
所以 – 总之, *如果你不需要QScintilla与PyQt4 和 PyQt5 *同时工作 ,那么ekhumoro的建议减去(XXX)的东西 – 这样,Eric应该没有问题地安装。
注意上面的信息:它可能会为Qt4打开QScintilla库
我猜最重要的是--pyqt=PyQt5
导致使用sip/qscimod5.sip
而不是sip/qscimod4.sip
。 不同之处在于它包含了对QAbstractScrollArea
非常重要的行%Import QtWidgets/QtWidgetsmod.sip
。