简体   繁体   中英

Desktop app created with PyInstaller doesn't run

I want to create an app for Windows but I've to developed it on Mac OS X. I've created a desktop app with Python using PyQt5. The steps that I followed are:

Step 1. Create a desktop app (On Mac OS X):

  • Install Qt.
  • Install Sip.
  • Install PyQt5.
  • ¡Develop!

Step 2. Package the Python app with PyInstaller(On Windows 8):

  • Install Python.
  • Install Pip-Win.
  • Install PyWin32.
  • Install PyInstaller.
  • Create the executable.

The problem is that, when I execute the app on Windows, it shows a window with the following message: Fatal error: app returned -1.

Anybody knows what is wrong? Maybe I need to do the Step 1 on Windows too?

PyInstaller brings together every dependancy of your python script. But you need to install all dependancies before running pyinstaller.

So, before running it on windows, you must install qt5, sip and pyqt5.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM