树莓派安装PySide2 您所在的位置:网站首页 树莓派安装pycharm报错 树莓派安装PySide2

树莓派安装PySide2

2023-07-16 06:09| 来源: 网络整理| 查看: 265

一、介绍

       最近使用树莓派做qt程序,用的是python语言,用python语言进行qt开发,使用PyQt5或者PySide2都可以,因PySide2为qt官方维护,更稳定,所以使用PySide2,PySide2和PyQt5很相似,使用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架构。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有