QsciScintilla on Pyqt4 for python35 error (unofficial whl)

52 views Asked by At

I want to use pyqt4 on python35. However, the latest official release supports py=<34 So I found this university website https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4 which unofficially extended support for later versions including python35

My problem is that QsciScintilla is not working. I tried to run this code:

import sys
from PyQt4.QtGui import QApplication
from PyQt4 import QtCore, QtGui, Qsci
from PyQt4.Qsci import QsciScintilla

if __name__ == "__main__":
    app = QApplication(sys.argv)
    editor = QsciScintilla()
    editor.show()
    sys.exit(app.exec_())

The window becomes unresponsive then crashes:

Process finished with exit code -1073740771 (0xC000041D)

The reason I want to use pyqt4 on python3.5 is that I have a quit big application built on pyqt4 and I want to upgrade python version of the project to 35

2

There are 2 answers

1
Mohammad Mouadi On

I moved to PyQt5. It is always not a good idea to use an unofficial package.

0
Misinahaiya On

Might your problem been solved after reformatting (refactoring, in somehow) the file as the follows:

import sys
from PyQt4.QtGui import QApplication
from PyQt4.Qsci import QsciScintilla

if __name__ == "__main__":
    app = QApplication(sys.argv)
    editor = QsciScintilla()
    editor.show()
    sys.exit(app.exec_())

And also comment me to show the version of your PyCharm as well as the Operating System to solve you more better.