4

我在旧的 Linux 系统(CentOS 4.4)上安装 PyQt4,由于硬件兼容性的原因无法升级。我已经安装了 Python 2.6、QT4 和 SIP,并且 PyQt4 的安装没有给我任何错误。

当我运行 Python 时,会发生这种情况:

Python 2.6.2 (r262:71600, May 11 2011, 14:18:37) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>> import PyQt4.Qsci
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Qsci

我环顾四周,发现/usr/local/lib/python2.6/site-packages/PyQt4/uic/widget-plugins/qscintilla.py几乎没有评论的东西:

pluginType = MODULE

def moduleInformation():
    return "PyQt4.Qsci", ("QsciScintilla", )

有任何想法吗?

4

1 回答 1

7

You need to install qscintilla separately. If PyQt is already installed, then you should just have to install the qscintilla python bindings. Hopefully this fixes your issue!

于 2011-05-18T18:38:44.560 回答