qscintilla python绑定问题

时间:2017-03-21 02:36:36

标签: python pyqt pyqt5 qscintilla

尝试遵循QSCintilla指令为PyQT5进行Python绑定

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信息,我可以看到依赖性正常

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

其他人遇到过类似的问题吗?

回答Barrys评论

pip3安装QScintilla返回

Requirement already satisfied: 
QScintilla in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages 
Requirement already satisfied: PyQt5>=5.7.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages (from QScintilla) 
Requirement already satisfied: sip<4.20,>=4.19 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages (from PyQt5>=5.7.1->QScintilla)

pip3 install 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)

0 个答案:

没有答案