[PyQt] PyQt 5.13.2 build error: module 'sipbuild.api' has no attribute ‘prepare_metadata_for_build_wheel'

Phil Thompson phil at riverbankcomputing.com
Sun Nov 10 10:19:01 GMT 2019


On 10/11/2019 06:15, FX wrote:
> Hi,
> 
> I am a maintainer at Homebrew (a macOS distro of software), and we are
> having trouble shipping sip 5.0.0 and PyQt 5.13.2. We install sip
> 5.0.0 from source with pip, which works fine. But then, building PyQt
> 5.13.2 from source leads to this error:
> 
>>    Traceback (most recent call last):
>>      File 
>> "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", 
>> line 103, in prepare_metadata_for_build_wheel
>>        hook = backend.prepare_metadata_for_build_wheel
>>    AttributeError: module 'sipbuild.api' has no attribute 
>> ‘prepare_metadata_for_build_wheel'
> 
> Full output can be found here:
> https://gist.github.com/fxcoudert/e281899294977af52d73ae184c5dac29
> The error happens just after:
> 
>>    Generating the Makefiles...
>>    Compiling the project...
>>    Installing the project…
> 
> We are building with Python 3.7.5, and are seeing the error on all
> macOS version (from 10.13 to the latest, 10.15).
> 
> I could not figure out what the error is, can someone provide insight
> or suggest some steps to debug the issue?

pip's error handling is awful and misleading...

https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html#building-pyqt5

The real exception is the traceback starting at line 1499. This implies 
that 'make install' is failing but pip discards the relevant 
information.

I'd suggest using sip-install, as the docs state, at least while you 
work out what the problem is.

Phil


More information about the PyQt mailing list