Python GUI - - PyQt6 (Ubuntu 24) 學習筆記(二)
感覺在 Windows 10 環境使用太辛苦了,Windows Defender 一直擋,一直發生錯誤!
想在 Ubuntu 環境試試 ...
** Ubuntu 24.04
Ubuntu 22.04.3 新酷音中文輸入法 安裝 紀錄
https://hackmd.io/@uoStF0JnQ2KW_h7HNvalFA/ryTtdp9pn
Angry IP Scanner - Download for Windows, Mac or Linux
https://angryip.org/download/#google_vignette
Download VNC Viewer for Linux by RealVNC
https://www.realvnc.com/en/connect/download/viewer/linux/
Python GUI - - PyQt6
** 書本範例
https://github.com/oxxostudio/book-code/blob/master/pyqt/ch01/code01.py
** Ubunut 中使用Anaconda Navigator GUI界面
https://www.nmking.io/index.php/2023/05/20/1230/
開啟其實很簡單,利用命令
source ~/.bashrc
anaconda-navigator
也可以寫成.sh以後直接執行即可
使用 Anaconda Jupyter ( 選用 )
Jupyter Notebook 完整介紹、安裝及使用說明
This got me a working designer. Then if you create ~/.local/share/application/desginer.desktop with this contents:
[Desktop Entry]
Version=1.0
Name=Qt Designer 6
Comment=Qt Designer 6
Exec=/usr/lib/qt6/bin/designer
Icon=/home/larry/.local/share/applications/qt_designer.ico
Terminal=false
Type=Application
Categories=Utility;Application;
then:
chmod 755 designer.desktop
Now it will appear with your other applicatiions
** 試用結果 使用 pycharm-community 最順
範例程式 ch07 / code09.py 讀取 *.txt 檔 , 顯示文字內容於視窗內
成功
修改 範例程式 ch07 / code09.py 為 readTXT.py 讀取 *.txt 檔,顯示文字內容 於較大的視窗內
範例程式 ch09 / code02.py 是個 計時器
安裝 pyinstaller 將 python 程式 製作成 windows 執行檔
安裝
pip install pyinstaller
執行
pyinstaller --onefile test.py
個人 在執行 pyinstaller 過程遇到多個錯誤,
objdump 錯誤
按照提示 逐一修正錯誤,重開機之後,就成功了
執行檔 輸出會放在 dist 子目錄
( 回到 win10 執行程式檔,並不能執行! )
** 安裝 py2exe 將 python 程式 製作成 windows 執行檔
原則上,這是用一個視窗來執行 pyinstaller
You can install this project using PyPI:
$ pip install auto-py-to-exe
Then to run it, execute the following in the terminal:
$ auto-py-to-exe
執行檔 輸出會放在 ~/output 子目錄
( 回到 win10 執行程式檔,並不能執行! )
** 安裝 cx_Freeze 將 python 程式 製作成 windows 執行檔
Installation
In a virtual environment, install by issuing the command:
pip install --upgrade cx_Freeze
To install the latest development build:
pip uninstall cx_Freeze
pip install --extra-index-url https://test.pypi.org/simple/ cx_Freeze --pre --no-cache
Please check the installation for more information and how to install in other environments.
2025-01-25
2025-01-26
2025-02-02
沒有留言:
張貼留言