user1544500 user1544500 - 1 year ago 97
Python Question

PyInstaller Tkinter window low resolution in App bundle, but not in app program

I think I'm missing something obvious but I can't figure it out myself.

I'm building a Mac App from Python 2.7 using PyInstaller (running the dev3.3 version). The app works fine, no issues. At the beginning there's a small window for updates which is built using Tkinter.

After building the app with PyInstaller (running the oneflie option) I get two files(

ls -al

-rwxr-xr-x 1 karoldra staff 62756614 8 lis 11:08 mac
drwxr-xr-x 3 karoldra staff 102 8 lis 11:09

Here's the structure of that folder:

  • mac


    • Contents

      • Frameworks

      • Info.plist

      • MacOs

        • mac

      • Resources

        • MyIcon.icns

Basically - the package contains exactly the same mac file as the main folder.

The issues is that I get a different resolution in my Tkinter window depending on which file I actually run. Here's a sample of the Tkiter window:

  • the top one is run from the

  • the bottom one is run from the

enter image description here

As you can see the bottom ones resolution is much lower for some reason...

Can somebody tell me why this is happening and how to solve this issue?

Answer Source

Eventually I found the answer by...carefully reading the docs ;) There's this one line which solve my problem:

For example, when you use PyQt5, you can set NSHighResolutionCapable to True to let your app also work in retina screen

In case someone else is seeing this problem on MacOs here's the answer:

My spec file was missing the High Resolution setting specified by the info_plist parameter. Here's an example:

app = BUNDLE(exe,
        'NSHighResolutionCapable': 'True'

Hope it will help someone else too!!! :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download