1、默认的基于树莓派的ubuntu20.04是无法获取python3-pyside2的相关软件包的,所以我们需要先配置下载源;
vim /etc/sources.list
//在最后一行添加
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main universe
//保存退出就可以了
2、安装pyside2
apt-get install python3-pyside2.qt3dcore python3-pyside2.qt3dinput python3-pyside2.qt3dlogic python3-pyside2.qt3drender python3-pyside2.qtcharts python3-pyside2.qtconcurrent python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qthelp python3-pyside2.qtlocation python3-pyside2.qtmultimedia python3-pyside2.qtmultimediawidgets python3-pyside2.qtnetwork python3-pyside2.qtopengl python3-pyside2.qtpositioning python3-pyside2.qtprintsupport python3-pyside2.qtqml python3-pyside2.qtquick python3-pyside2.qtquickwidgets python3-pyside2.qtscript python3-pyside2.qtscripttools python3-pyside2.qtsensors python3-pyside2.qtsql python3-pyside2.qtsvg python3-pyside2.qttest python3-pyside2.qttexttospeech python3-pyside2.qtuitools python3-pyside2.qtwebchannel python3-pyside2.qtwebsockets python3-pyside2.qtwidgets python3-pyside2.qtx11extras python3-pyside2.qtxml python3-pyside2.qtxmlpatterns
3、安装shiboken2
apt-get install shiboken2
之后我们就可以愉快运行python QT程序了
树莓派4运行Ubuntu20.04与Python pyside2环境搭建

本文介绍了如何在树莓派4上使用Ubuntu20.04操作系统配置Python pyside2环境。由于默认软件源不包含pyside2相关包,因此首先需要更换下载源,然后分别安装pyside2和shiboken2,最终实现Python QT程序的顺利运行。
最低0.47元/天 解锁文章
1673

被折叠的 条评论
为什么被折叠?



