1、安装PyQt5
apt-get install python3-pyqt5
或者
pip3 install PyQt5
pip3 install PyQt5-tools
出现问题:
Sub-process /usr/bin/dpkg returned an error code (1)
解决方法,终端执行:
cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
sudo dpkg --configure -a
sudo apt-get install -f
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bak
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info.bak /var/lib/dpkg/info
2、安装qt-designer
apt-get install qt5-default qttools5-dev-tools
3、将qt-design设计的ui文件转换成py文件
pyuic5 -o *.py *.ui
网友评论