【jetsonXariver】ARM64安装pyqt

一、python环境

在Xariver上安装pyqt5,但是使用pip install pyqt5 方法时上会出现类似下面这样的问题,或者就是卡住无法继续

Successfully installed PyQt-builder-1.13.0 packaging-21.3 ply-3.11 pyparsing-3.0.9 setuptools-65.3.0 sip-6.6.2 toml-0.10.2
  Cleaning up...
    Removing source in /tmp/pip-install-2gmr_frd/sip
  Removed build tracker: '/tmp/pip-req-tracker-vuj8lfsc'
  Installing build dependencies ... done
  Running command /usr/bin/python3 /tmp/tmppi_h1r7x get_requires_for_build_wheel /tmp/tmpx88x82dh
  Getting requirements to build wheel ... done
    Created temporary directory: /tmp/pip-modern-metadata-b__1na9b
    Running command /usr/bin/python3 /tmp/tmpwp46ffki prepare_metadata_for_build_wheel /tmp/tmpxrg1n2t9
    Querying qmake about your Qt installation...
    This is the GPL version of PyQt 5.15.7 (licensed under the GNU General Public License) for Python 3.8.10 on linux.
    Type 'L' to view the license.
    Type 'yes' to accept the terms of the license.
    Type 'no' to decline the terms of the license.

二、手动编译

安装PyQt5以及SIP,PyQt5版本需与SIP要对应
sip 4.19.25 下载
pyqt5 5.15.2 下载

## 1.源码编译需要依赖qmake工具链
sudo apt-get install qt5-default
## 2.安装编译所需的软件包
sudo apt-get install cmake gcc g++
pip3 install --upgrade pip
pip3 install wheel setuptools
##3.编译SIP包
tar zxvf sip-4.19.25.tar.gz
cd ./sip-4.19.25
python configure.py --sip-module PyQt5.sip
##
 sudo make
 sudo make install

##4.编译 PyQt5
tar zxvf PyQt5-5.15.2.tar.gz
cd ./PyQt5-5.15.2
python configure.py
sudo make -j4 
sudo make install

三、测试pyqt

#测试PyQt5的功能
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_())

ok!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

三年不回来

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值