Python GUI - - PyQt6 ( win10 ) 學習筆記(一), (三)
******************************************************
Python GUI - - PyQt6 學習筆記(三) 成功
2025-02-04
******************************************************
這次在 Win10 環境 再次安裝 python 使用 python3.12
在Windows底下最適當安裝Python環境的方法
https://ithelp.ithome.com.tw/articles/10210071
python 3.12.8
https://www.python.org/downloads/release/python-3128/
( 要依照上面教學來安裝 )
【Windows】Windows10 安裝 Anaconda 環境
Anaconda Navigator with Python 3.12
https://www.anaconda.com/download/success
Anaconda Navigator --> jupyter notebook
家中電腦錯誤不執行 (X) , 辦公室電腦執行 成功 ( O)
Anaconda Navigator --> Spyder
家中電腦執行後 kernel 錯誤 (X) , 辦公室電腦執行 成功 ( O)
** 書本範例
https://github.com/oxxostudio/book-code/blob/master/pyqt/ch01/code01.py
執行成功
PyQt6 與 tkinter 程式 都可以執行了!
> pip install PyQt6
之後以指令將 *.ui 檔成 *.py 檔,
例如:
> pyuic6 -x test.ui -o test.py
> pyuic6 -x menu01.ui -o menu01.py
*.py 檔 就可以用 pyCharm 打開執行了
** 安裝 pyinstaller 將 python 程式 製作成 windows 執行檔
安裝
pip install pyinstaller
執行
pyinstaller --onefile menu01.py
pyinstaller --onefile --windowed menu01.py
執行檔 輸出會放在 dist 子目錄
menu01.exe 執行 成功!
** 安裝 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 子目錄
menu01.exe 執行 成功!
******************************************************
Python GUI - - PyQt6 學習筆記(一) 不順
2025-01-24
******************************************************
感覺 這次在 Win10 環境使用太辛苦了,Windows Defender 一直擋,一直發生錯誤!
想在 Ubuntu 環境試試 ...
--> Python GUI - - PyQt6 學習筆記(二)
https://helloshiau.blogspot.com/2025/01/python-gui-pyqt6_11.html
** 書本範例
https://github.com/oxxostudio/book-code/blob/master/pyqt/ch01/code01.py
使用 Anaconda Jupyter (X) 不能執行
https://steam.oxxostudio.tw/category/python/info/anaconda.html2025-01-24
2025-01-25
2025-02-07
沒有留言:
張貼留言