顯示具有 PyQt5 標籤的文章。 顯示所有文章
顯示具有 PyQt5 標籤的文章。 顯示所有文章

2023年7月29日 星期六

在Ubuntu 22.04完善Python 3(pip3、Tkinter、Qt5、idle)

Ubuntu22.04已內建Python 3
1.加裝pip功能:
sudo apt install -y python3-pip

就可以用pip3的指令安裝模組,例如:
pip3 模組名稱

2.加裝其他功能:
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev

3.加裝Tkinter
sudo apt install python3-tk

4.加裝Qt5
sudo apt-get install qt5-default
sudo apt-get install qttools5-dev-tools
pip3 install pyqt5

開啟方式如下圖:

或是:


執行結果如下圖:


5.加裝idle
sudo apt install idle3

開啟方式如下圖:
或是:


執行結果如下圖:

2023年6月20日 星期二

How to install PyQt5 on Linux?

 Python is often installed by default on Linux (in nearly all of the distributions including Ubuntu). But you want to make sure to use Python 3, because of all the features and ease of use. You can verify that you have the newest Python version with the command:

python --version

On Ubuntu Linux they sometimes include two versions of python, python3 and python. In that case use Python 3.

Once you have Python ready, the next step is to install PyQt.

This isn’t hard to do if you have some Linux experience. You can install PyQt your software package manager. Which package manager to use depends on which Linux distribution you are using.

On Ubuntu Linux / Debian Linux you can use the command:

sudo apt-get install python3-pyqt5