I am experiencing trouble trying to get the combination of Qt 5.8.0 / PyQt 5.7.1 / sip 4.19 / Python3.5 to install & work correctly on my macOS 10.12.2 (Sierra).

Steps to reproduce the problem:

(I am being very specific for if anyone else will ever venture here trying to accomplish the same thing)

  1. Install Python3.5 via homebrew (brew install python3.5).
  2. Installing PyQt5 via homebrew however did not work as my python code complained that it could not find the pyqt module. I fixed it by applying some symlinks. Yet, the code remained buggy throwing up errors like QtGui.QApplication was missing etc. I also found multiple complains of macOS users that had run into similar problems but I could not find any real solution. So, I removed all my symlinks and ran brew uninstall pyqt5.
  3. Then I found this gist on GitHub, and started following that so I:
  4. Downloaded qt-opensource-mac-x64-clang-5.8.0.dmg from qt-project.org
  5. Downloaded SIP and PyQt5-gpl sources as mentioned in the gist.
  6. I then unpacked the SIP & PyQt5 tar files. Then I executed the command:

    python3.5 ~/Downloads/sip-4.19/configure.py -d /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages --arch x86_64
  7. So far, so good. Also make, sudo make install & sudo make clean, as mentioned in the gist, executed without a problem.

  8. Now, I arrived at step nr. 13 from the gist, which told me to make a small change to the !host_build command listed in the ~/Qt5.8.0/5.8/clang_64/mkspecs/qdevice.pri file. The file however did not mention any !host_build comment at all, so I added one myself.
  9. Then, at step 15 from the gist I executed:

    python3.5 configure.py --destdir /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages --qmake ~/Qt5.8.0/5.8/clang_64/bin/qmake
  10. This gave a SDK path error, which I fixed by running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer as per instruction on this post on Stack from people that ran into a similar problem.

  11. Now, the code mentioned above in step 10 did execute, but it threw up an error:

    Error: This version of PyQt5 and the commercial version of Qt have incompatible licenses

  12. So, I searched and arrived at a post on the QT forum. It helped me solve the error by making some small adjustments to PyQt5's configure.py file (commenting out the license check).

  13. Then, I was finally able to successfully run the command I mentioned at step 10 (step 15 from the gist).
  14. However, when I tried to run make again, everything seems to be going perfect until it now throws out this error that, so far, I have not been able to fix:

    ~/Downloads/PyQt5_gpl-5.7.1/QtCore/sipQtCoreQt.cpp:1093:62: error: no member named 'WindowCancelButtonHint' in namespace 'Qt'; did you mean
        {sipName_WindowCancelButtonHint, static_cast<int>( ::Qt::WindowCancelButtonHint), 419},
    ../../../Qt5.8.0/5.8/clang_64/lib/QtCore.framework/Headers/qnamespace.h:300:9: note: 'WindowCloseButtonHint' declared here
            WindowCloseButtonHint = 0x08000000,
    ~/Downloads/PyQt5_gpl-5.7.1/QtCore/sipQtCoreQt.cpp:1106:58: error: no member named 'WindowOkButtonHint' in namespace 'Qt'
        {sipName_WindowOkButtonHint, static_cast<int>( ::Qt::WindowOkButtonHint), 419},
    2 errors generated.
    make[1]: *** [sipQtCoreQt.o] Error 1
    make: *** [sub-QtCore-make_first-ordered] Error 2

Is there anyone able to help me out?

  • Thnx! I updated the error so it is now shown correctly. Also thnx on the other editing. Pretty new to these forums so learning as I go..
    – Montmons
    Commented Jan 25, 2017 at 14:05
  • Not that it helps, but I'm in the same boat. Glad I found this.
    – kbyrd
    Commented Jan 26, 2017 at 21:41

1 Answer 1


I am the one who did the Qt5 5.8.0 upgrade for Homebrew. This is a known problem that will persist until Riverbank upgrades their software. I suggest you contact them on their mailing list.

UPDATE: As a temporary workaround, I've added a [email protected] formula, and updated the PyQt5 formula to depend on it. See the following pull requests, which I've merged:



  • Ah, well then that solves it. Well, at least, I don't have to keep searching. Thnx for the tip, I've enrolled to the mailinglist so I'll contact them there.
    – Montmons
    Commented Jan 26, 2017 at 10:10
  • 1
    SB87 I've updated my answer with info about our temporary workaround in Homebrew, which should hold you over until Riverbank catches up.
    – ilovezfs
    Commented Jan 27, 2017 at 4:54
  • Ah sorry, was away for the weekend. Still had some trouble at first, after reinstalling PyQt5 via Homebrew, but turned out it was a local mess up. After some struggling, it all works fine now. Thnx!
    – Montmons
    Commented Jan 29, 2017 at 19:45
  • Glad you got it working! Also some progress upstream. PyQt5_gpl-5.8.dev1701311752.tar.gz was posted on riverbankcomputing.com/software/pyqt/download5. I haven't tested it yet but presumably it will get this all working with Qt 5.8.
    – ilovezfs
    Commented Feb 1, 2017 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .