当前位置:   article > 正文

【jetsonXariver】ARM64安装pyqt_arm64 pip安装pyqt5

arm64 pip安装pyqt5

一、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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

二、手动编译

安装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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

三、测试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_())
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

ok!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/117492
推荐阅读
相关标签
  

闽ICP备14008679号