一些Qt5快速回顾

ref:https://build-system.fman.io/pyqt5-tutorial

https://www.pythonguis.com/tutorials/packaging-pyqt5-apps-fbs/
https://www.malaoshi.top/show_1EF6JsL7UUFK.html

pyinstaller==5.1

fbs免费版只支持python3.5/3.6
conda创建32位python3.6环境可用

set CONDA_FORCE_32BIT=1  # 切换到32位conda
conda create -n demo32 python=3.6
set CONDA_FORCE_32BIT=0  # 切换回64位conda

conda activate demo32 # 激活环境
pip3 install fbs PyQt5 PyInstaller==3.4 # 安装fbs和pyinstaller

导出exe

# 直接使用pyinstaller, -w是使用windows, -c是使用控制台
pyinstaller -F -w script.py 

# 使用fbs打包
fbs startproject
fbs run
fbs release

注:虽然但是, 可能旧版本还是会无法跑,也可以试试在64位下跑新版本(pyinstaller==5.1)

posted @ 2023-09-11 16:38  wioponsen  阅读(6)  评论(0编辑  收藏  举报