jetson Xavier NX安装PySide2

安装步骤

  1. 下载Qt5资源包(完整资源包、基础资源,包二选一)

    完整资源包下载命令:wget http://master.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz 
    基础包下载命令:wget http://master.qt.io/archive/qt/5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz
    
  2. 配置和安装Qt5

    解压:tar -xpf qtbase-everywhere-src-5.15.2.tar.xz
    切换路径:cd qtbase-everywhere-src-5.15.2/
    配置./configure -xcb
    编译:make -j4
    安装:sudo make install
    # 通常安装在 /usr/local/Qt-5.15.2
    
  3. 检测依赖

    依赖:Python: 3.5+, Qt: 5.12+, libclang: version10, CMake:3.1+, llvm: version10
    建议使用synaptic管理包
    sudo apt-get install synaptic
    
  4. 下载并构建PySide2

    git clone http://code.qt.io/pyside/pyside-setup.git
    cd pyside-setup/
    git checkout 5.15.2
    
  5. 安装PySide2

    sudo python setup.py install --qmake=/usr/local/Qt-5.15.2/bin/qmake
    
  6. 检验是否安装成功

    python
    from PySide2 import *
    

常见报错

错误1:
– LLVM_CONFIG: /usr/local/bin/llvm-config
CMake Error at data/shiboken_helpers.cmake:180 (message):
Unable to find the Clang library in /usr/local. Names tried: clang,
libclang.so, libclang.so.1.
Call Stack (most recent call first):
CMakeLists.txt:39 (setup_clang)
解决方案:
dpkg -l | grep clang
dpkg -l | grep llvm

你可能感兴趣的:(jetson,python,pyside6)