板子是Thinkerboard 2s 内存2gb 由于内存过小的原因 因此“只能用手动编译的方法去安装”
安装参考的下面这篇文章
嵌入式ARM 64位平台源码编译安装PyQt5及其在虚拟环境中的调用配置
踩过的坑:
1、找不到sip
2、SystemError: initialization of QtWidgets failed without raising an exception
安装步骤
1、安装的虚拟环境为miniconda
2、下载 sip-4.19.25 pyqt5-5.15.2
注意必须是这两个版本否则不保证能运行
3、在miniconda中创建虚拟环境pyqt5
conda create -n pyqt5 python=3.7
4、切换到虚拟环境
conda activate pyqt5
5、安装qmake
sudo apt install qt5-default
验证qmake是否安装好
qmake --version
6、安装编译需要的SIP包
sudo apt-get install cmake gcc g++
pip3 install --upgrade pip
pip3 install wheel setuptools
编译包参考
7、编译SIP包
(pyqt5) user@admin:~$ cd ./pyqt5/
(pyqt5) user@admin:~$ tar zxvf sip-4.19.25.tar.gz
pyqt5) user@admin:~/pyqt5$ cd ./sip-4.19.25
(pyqt5) user@admin:~/pyqt5/sip-4.19.25$ sudo python3 configure.py --sip-module PyQt5.sip
This is SIP 4.19.25 for Python 3.9.2 on linux.
The SIP code generator will be installed in /usr/bin.
The sip.h header file will be installed in /usr/include/python3.7m.
The PyQt5.sip module will be installed in /usr/lib/python3/dist-packages/PyQt5.
The sip.pyi stub file will be installed in
/usr/lib/python3/dis