Python Forum
packaging a PyQt app for macOS
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
packaging a PyQt app for macOS
#1
I am trying to package my PyQt based image viewer, shufti, for macOS but I've not had much luck so far. It runs fine from the terminal (if you have Python 3 and PyQt installed already) and  I have already successfully packaged it for Windows using cx_freeze so I was hoping it would be as easy under OSX - nope. I have got a MacPorts version of cx_freeze to spit out a binary but its only a few MB in size when I'd be expecting something closer to 80 MB like the Windows build as it is having to bundle most of python 3, Qt and PyQt. When I run it (from the terminal with open -a) I get a very vague error before being dumped to a (Xcode?) debugger of which I havent got a clue how to use, never having done any OSX dev.

I have found a guide on pythonschool.net (I'm not allowed to post links yet) called 'Distributing your application on OSX' but its quite outdated, following it hasn't worked for me and the author hasn't replied to my email. Nor has the cx_freeze dev, which is a bit concerning but he may just be busy?

My main questions are:

1 - Is cx_freeze the best tool for the job under macOS?

2 - Does cx_freeze work under Sierra?

3 - Do I have to use a specific version of python, PyQt and/or cx_freeze for this to work? Using macports builds of all the python components seems to be the way t go but this requirement is entirely missing from the official cx_freeze docs.

4 - Will the binary work on OSX Intel 10.6+ or will it be Sierra+ only if I build it under Sierra?

Any tips that anyone has on how to bundle and debug pyqt apps for macOS will be greatly appreciated.

Please be aware that shufti is not only my first ever PyQt app, its also the first ever Python app I've written so please go easy on me if you find it on github!

Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  macOS Sonoma (14) seems to need a newer version of Tcl/Tk gernophil 1 1,088 Oct-11-2023, 05:53 PM
Last Post: deanhystad
  UI modules: which is most suitable for macOS app design? Anon_Brown 1 1,880 Nov-19-2021, 06:24 PM
Last Post: Larz60+
  macOS GUI pythonnewbi 5 3,048 Jul-05-2020, 03:56 PM
Last Post: ndc85430
  [Tkinter] macOS Catalina and Python menu issue SouthernYankee 7 6,813 Dec-11-2019, 02:02 AM
Last Post: chrstphrchvz
  [Tkinter] Image with pillow on macos not showing rhoekstra 3 4,750 May-04-2019, 11:48 PM
Last Post: Larz60+
  Packaging VTK and ITK for macOS sandrider 0 2,010 Nov-01-2018, 05:24 AM
Last Post: sandrider
  About Dialog in PyQt5 on macOS cpuin 0 2,879 Jan-23-2018, 08:50 PM
Last Post: cpuin
  [WxPython] Issues with Exe generation and Packaging dependencies Ravikumar 1 2,623 Nov-23-2017, 12:53 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020