尝试遵循 QSCintilla 指令重新绑定 PyQT5
Python Bindings
The Python bindings are in the Python directory. You must have either PyQt v4 or v5 already installed. QScintilla must also already be built and installed.
The configure, build and install the bindings for PyQt v4, run:
python configure.py
make
make install On Windows (and depending on the compiler you are using) you may need to run nmake rather than make.
If you want to build the bindings for PyQt v5 then pass –pyqt=PyQt5 as an argument to configure.py.
但是当我运行以下命令时,它抱怨没有安装 PyQt5
python configure.py --qmake=/users/marklloyd/Qt/5.8/clang_64/bin/qmake --pyqt=PyQt5
Error: Unable to import PyQt5.QtCore. Make sure PyQt5 is installed
如果我运行 brew info 我可以看到依赖是好的
brew info qscintilla2
qscintilla2: stable 2.10 (bottled) Port to Qt of the Scintilla editing component https://www.riverbankcomputing.com/software/qscintilla/intro /usr/local/Cellar/qscintilla2/2.10 (135 files, 6.9MB) * Poured from bottle on 2017-03-21 at 13:54:46 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/qscintilla2.rb
==> Dependencies Required: qt5 ✔, sip --with-python3 ✔, pyqt5 ✔
==> Requirements Recommended: python3 ✔ Optional: python ✔
==> Options
--with-plugin Build the Qt Designer plugin
--with-python Build Python bindings
--without-python3 Do not build Python3 bindings
这是 OSX 10.12.3 仅供参考,我很高兴承认我根本不是这方面的专家。
我正在尝试让 QScintilla 正常工作,这样我就可以从 Pycom 安装 PyMakr 并正常工作
Pymakr-master marklloyd$ python install.py
Checking dependencies
Python Version: 2.7.12
Found PyQt5
Found pyuic5
Sorry, please install QScintilla2 and
its PyQt5/PyQt4 wrapper.
Error: cannot import name Qsci
还有其他人遇到过类似的问题吗?
回答巴里斯评论
pip3 install QScintilla 返回
Requirement already satisfied:
QScintilla in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requirement already satisfied: PyQt5>=5.7.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from QScintilla)
Requirement already satisfied: sip<4.20,>=4.19 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from PyQt5>=5.7.1->QScintilla)
pip3 安装 pyqt5
Requirement already satisfied: pyqt5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requirement already satisfied: sip<4.20,>=4.19 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pyqt5)