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

FX fxcoudert at gmail.com
Sun Nov 10 14:31:01 GMT 2019

> The documentation does not have anything pyqtbuild. It does have something about  PyQt-builder, but it’s not clear it is the  same as pyqtbuild? And even so, it’s only mentioned in the "Bundling Qt Using pyqt-bundle”, which is not what I am trying to do.

Documenting my progress: apparently this is it. Installing PyQt-builder allows sip-install to progress further.

Now the build fails with:

Generating the pyrcc5 script...
Generating the pyuic5 script...
Generating the .pro file for the Qt module...
sip-install: An internal error occurred...
Traceback (most recent call last):
  File "/usr/local/opt/sip/bin/sip-install", line 11, in <module>
    load_entry_point('sip==5.0.0', 'console_scripts', 'sip-install')()
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/tools/install.py", line 37, in main
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/exceptions.py", line 81, in handle_exception
    raise e
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/tools/install.py", line 34, in main
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/project.py", line 287, in install
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/builder.py", line 214, in install
  File "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py", line 122, in build_project
  File "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py", line 389, in _generate_module_pro_file
    self._install(pro_lines, installed, installable, target_dir)
  File "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py", line 458, in _install
    installable.install(target_dir, installed, do_install=False)
  File "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/installable.py", line 61, in install
    os.makedirs(target_dir, exist_ok=True)
  File "/usr/local/Cellar/sip/5.0.0/libexec/bin/../lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 1] Operation not permitted: '/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/PyQt5’

It is trying to write to the sip installation directory, to which it does not have access (in Homebrew, packages are not allowed to write to other packages’ folders).

Previously we configured with:

-    args = ["--confirm-license",
-            "--bindir=#{bin}",
-            "--destdir=#{lib}/python#{version}/site-packages",
-            "--stubsdir=#{lib}/python#{version}/site-packages/PyQt5",
-            "--sipdir=#{share}/sip/Qt5",
-            # sip.h could not be found automatically
-            "--sip-incdir=#{Formula["sip"].opt_include}",
-            "--qmake=#{Formula["qt"].bin}/qmake",
-            # Force deployment target to avoid libc++ issues
-            "QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}",
-            "--qml-plugindir=#{pkgshare}/plugins",
-            "--verbose”]

Could you advice what would be the closest options for this? Many of these options do no exist anymore…


More information about the PyQt mailing list