0

When using QWebEngineView, I get a crash "LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it!" and the app closes.

I installed Python 3.10 and PySide2==5.15.2.1 through miniconda3 on an Ubuntu 22.04.3 x86 64Bit machine. Other (apt) packages like python3-pyqt5.qtwebengine or python3-pyqt5.qtwebkit are not installed.

Here is a minimal code example to reproduce it:

import sys
from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QPushButton
from PySide2.QtWebEngineWidgets import QWebEngineView


class MainWindow(QMainWindow):

    def __init__(self):
        super(MainWindow, self).__init__()

        self.setWindowTitle("My App")

        layout = QVBoxLayout()
        btn = QPushButton('quit')
        btn.clicked.connect(self.appquit)
        layout.addWidget(btn)
        layout.addWidget(QWebEngineView())

        widget = QWidget()
        widget.setLayout(layout)
        self.setCentralWidget(widget)

    def appquit(self):
        QApplication.quit()


app = QApplication(sys.argv)
window = MainWindow()
window.show()

app.exec_()

Has it something to do with the Blink (Chromium) web engine?

Edit: The only link I found from QT to LLVM was mentioned on this site under "Dependencies": https://pypi.org/project/PySide2/ However, libclang was not neccessary on another machine to use QWebEngineView.

MiaPlan.de
  • 102
  • 8
  • May be related to https://stackoverflow.com/q/72346850/18281361 – MiaPlan.de Aug 28 '23 at 15:31
  • 1
    See [VTK issue #19026](https://gitlab.kitware.com/vtk/vtk/-/issues/19026) and [Mesa issue #9442](https://gitlab.freedesktop.org/mesa/mesa/-/issues/9442). For now, work with a bare metal PC or old versions of SW. – relent95 Aug 29 '23 at 00:55
  • That seems to be it. Can you elaborate a bit on the "use old SW"? Do you mean downgrading PySide or Ubuntu? – MiaPlan.de Aug 29 '23 at 06:59
  • Well, I mean using old Mesa version, hence Ubuntu 20.04 for example. Of course downgrading is not possible. You better to setup a new system. – relent95 Aug 30 '23 at 03:02

0 Answers0