ImportError: No module named 'PyQt5.sip'

Patrick Stinson patrickkidd at
Tue Apr 28 08:26:27 BST 2020

Now I am asking the same question as the OP. I built Python-3.8.4, sip-5.2.0, and PyQt5-5.14.2 on macOS and got the same error.

I built sip with “python install”

turin:vendor patrick$ python -c "import PyQt5.QtGui"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.sip'


> On Apr 27, 2020, at 1:33 PM, Phil Thompson <phil at> wrote:
> On 27/04/2020 22:19, Gabriele Bulfon wrote:
>> Great Phil, that's where I pulled sources for both of them.
>> I have built and packaged PyQt5-sip and PyQt5 from those sources,
>> after building and packaging sip5 and PyQt-builder.
>> Maybe there's something wrong in what I'm delivering to the system
>> with PyQt5-sip?
>> Here's a brief of the files delivered by my package, as in the package
>> definition file (pkg, solaris).
>> I derived this from the prototype area generated by the build/install
>> on the prototype install root.
>> I bet something is wrong with the file...I still
>> don't understand how these cpython so files are looked up, but that is
>> what the build system created in the prototype area.
>> dir path=usr
>> dir path=usr/lib
>> dir path=usr/lib/python$(PYVER)
>> dir path=usr/lib/python$(PYVER)/vendor-packages
>> dir path=usr/lib/python$(PYVER)/vendor-packages/PyQt5
>> dir
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5_sip-12.7.2-py$(PYVER).egg-info
>> file usr/lib/python$(PYVER)/vendor-packages/PyQt5/
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5/
>> file
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5_sip-12.7.2-py$(PYVER).egg-info/PKG-INFO
>> file
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5_sip-12.7.2-py$(PYVER).egg-info/SOURCES.txt
>> file
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5_sip-12.7.2-py$(PYVER).egg-info/dependency_links.txt
>> file
>> path=usr/lib/python$(PYVER)/vendor-packages/PyQt5_sip-12.7.2-py$(PYVER).egg-info/top_level.txt
> I would expect to see .dist-info rather than .egg-info. Maybe your setuptools is too old.
> Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list