Segmentation fault (core dumped) when i run test.py to verify PyQt5

Hi,

I have install PyQt5 as following steps:

sudo apt-get install qt5-default
sudo apt-get install cmake gcc g++
pip3 install --upgrade pip
pip3 install wheel setuptools
tar zxvf sip-4.19.25.tar.gz
cd ./sip-4.19.25
sudo python37 configure.py --sip-module PyQt5.sip
 sudo make
 sudo make install
tar zxvf PyQt5-5.15.2.tar.gz
 cd ./PyQt5-5.15.2
  sudo python37 configure.py
sudo make -j4 
sudo make install

but the issue occur while i run the test.py the blog given:

import sys
from PyQt5 import QtWidgets, QtCore

app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
widget.resize(360, 360)
widget.setWindowTitle("Hello, World")
widget.show()
sys.exit(app.exec_())

I use python3.7,Version: 5.0.2-b231,opencv-python4.8.1。

Thanks in advance for your answers!

Hi,
There are useful links in the topic:
Installing QT6 and PySide6 on Jetson Orin Nano

Please take a look and give it a try.

Hi,
I have follow your recommend methods,but the issue remain exist:Segmentation fault (core dumped)!

method 1(don’t work):


method 2(don’t work):
sudo apt-get install build-essential python3-dev python3-pip python3-pyqt5.qtsvg python3-pyqt5.qtwebkit

plz,help me.