python 2.7 / pyqt5 and pyinstaller : sip module error

after trying pyqt5 with python3.+ i had some problems with the code than i used python2.7 + pyqt5(for python2.7) and everything worked fine from pycharm and when i run the script from cmd. now the problem with pyinstaller pyqt4 / python 2.7 : pyinstaller compile the script and worked fine pyqt5 / python 2.7 : pyinstaller compile the script but don't work and i capture an error that no module named sip. the last version of sip 4.19 available only for python3. if add : import sip to the code i see another error message : application faild to start because it could not find or load th Qt platform plugin "windows" all these versions the same problem : python 2.7.1 / python 2.7.9 / anaconda(python2.7) / winpython(python2.7) the code :

import sys
import sip
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
button = QtWidgets.QPushButton("Hello")
button.setFixedSize(100, 50)
button.show()
app.exec_()

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image