树莓派安装PySide2

一、介绍

       最近使用树莓派做qt程序,用的是python语言,用python语言进行qt开发,使用PyQt5或者PySide2都可以,因PySide2为qt官方维护,更稳定,所以使用PySide2PySide2PyQt5很相似,使用PyQt5写的程序,只要改一下库的导入,就可以快速切换到PySide2开发。

二、问题

Windows系统上直接使用:

pip install pyside2

就可以安装PySide2,但是在树莓派等Linux系统下不行,这样会报错.

三、安装

1、安装PySide2
sudo 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
2、安装shiboken2
sudo apt-get install shiboken2
3、其他问题

       有时候安装失败可能是树莓派软件源里没有PySide2,需要换源,国内的很多源都可以,我一般使用的是清华大学的镜像源,给树莓派换清华源教程

       PS:这种安装PySide2的方法对其它Linux也适用,经测试,在Ubuntu20.04、Ubuntu21.04、CentOS8系统上都可以正常安装,包括arm和x86架构。

  • 9
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值