I have 2 virtual machines with win32 and win64. I build program with PyQt5 and package it with PyInstaller(3.3.1), by using following command:
pyinstaller updater.py --noconsole --onefile -i icons/icon.ico
When I do this on win64 machine, it works fine. Program working. But when I do the same on win32 machine, my generated .exe
file began require Admin privileges and even after confirm app is crashed. I checked this question: Why does my pyinstaller created executable require admin privileges?
and rename app, but it still crashing. What can cause this ? Why on win32 defender blocks my app or maybe reason is not in defender.
class MainWindow(QtWidgets.QMainWindow):
def __init__(self):
super(MainWindow, self).__init__(flags=QtCore.Qt.Dialog)
self.progress_bar = QtWidgets.QProgressBar()
self.progress_label = QtWidgets.QLabel()
central_widget = QtWidgets.QWidget(flags=QtCore.Qt.Widget)
central_layout = QtWidgets.QVBoxLayout()
central_layout.addWidget(self.progress_bar)
central_layout.addWidget(self.progress_label, alignment=QtCore.Qt.AlignLeft)
central_widget.setLayout(central_layout)
self.setCentralWidget(central_widget)
self.progress_label.setStyleSheet('color: grey')
def main():
application = QtWidgets.QApplication(sys.argv)
main_window = MainWindow()
main_window.setFixedSize(480, 120)
main_window.show()
sys.exit(application.exec_())
if __name__ == '__main__':
main()
requirements.txt:
PyInstaller==3.3.1
PyQt5==5.10.1
requests==2.18.4