$sudo apt-get update
2.安裝pip
$sudo apt-get install python3-pip
3.用pip安裝PyQt5
$sudo pip3 install PyQt5
4.安裝Qt5 creator 和 designer
$sudo apt-get install qtcreator
$sudo apt-get install qt5-default qttools5-dev-tools
5.啟動 designer
$designer
或
$/usr/lib/x86_64-linux-gnu/qt5/bin/desgner
6.那我們利用上述指令寫成Shell
檔名:PyQt5Install.sh
#!/bin/bash
apt-get update
apt-get install -y python3-pip
pip3 install -y PyQt5
apt-get install -y qtcreator
apt-get install -y qt5-default qttools5-dev-tools
7.變更 PyQt5Install.sh 權限為可執行
sudo chmod +x PyQt5Install.sh
8.執行 PyQt5Install.sh
sudo sh PyQt5Install.sh
資料來源:7.變更 PyQt5Install.sh 權限為可執行
sudo chmod +x PyQt5Install.sh
8.執行 PyQt5Install.sh
sudo sh PyQt5Install.sh
1.Ubuntu16.04中安装Python3 - PyQt5 & Qt5 & Qt-designer
沒有留言:
張貼留言