简体   繁体   中英

How to create a self contained Python Qt app on mac

I've recently started using a mac, and I'm curious about how to make a mac app that uses PyQt and is self-contained.

Can anyone give me any pointers on where to start and what I'll need?

PyInstaller should be pretty good for that -- it's cross-platform (Mac, Windows, Linux) and offers out-of-the-box support for PyQt (among other useful third-party libraries). Now that a good release (1.4) has finally been recognized as stable, and officially released, after a somewhat long hiatus, PyInstaller is fully "back in business" and my favorite packager!-)

Ars Technica did a fantastic article on this exact topic last year.

Check out page 2 of the article How-to:Deploying PyQt applications on Windows and Mac OS X

Quick Summary: It is possible, but time consuming, results in large app bundles, and their are some strange quirks.

This post was written in March of 2009, so the situation might be different.

I've tried the same for some weeks now. Finally i have to say py2app just wont do. I was lucky with pyinstaller1.4. Although you need to add some minor modifications to run flawlessly on OS X. Furthermore the apps it creates are only 1/4 of the size compared to py2app. And most important it works :) And yet another goodie ... it works with the python framework which ships with OS X so there is no need to install python via MacPorts etc.

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