当前位置:网站首页>Pyinstaller+InstallForge多文件项目软件打包
Pyinstaller+InstallForge多文件项目软件打包
2022-07-23 13:55:00 【HiJack¹】
一、项目文件目录
Project
------main.py
------mainPage.py
------aiJudge.py
------audioCollection.py
------predict.py
------aiJudge
------audioCollection
------checkpoints
------SCALER_LIBROSA.m
------checkpoint_model.h5
------checkpoint_model.json
------configs
------lstm.yaml
------extract_feats
------mylibrosa.py
------features
------predict.p
------train.p
------models
------LSTM.py
------statics
------files.jpg
------utils
------plot.py
------opts.p
二、Pyinstaller打包
多个python文件打包命令如下,其中main.py为程序入口
pyinstaller -D -i C:\Users\Desktop\icon.ico -w main.py -p aiJudge.py -p audioCollection.py -p mainPage.py -p predict.py --hidden-import aiJudge.py --hidden-import audioCollection.py --hidden-import mainPage.py --hidden-import predict.py
参数说明
| 参数 | 说明 |
|---|---|
| -D | 打包多个文件,在dist中生成很多依赖文件 |
| -w | 当程序启动的时候不会打开命令行(只对Windows有效) |
| -i | 改变程序的图标 |
| -p | 设置导入路径,指明程序需要的资源 |
打包完成后,生成dist、build、main.spec文件(dist中包含名为main的项目文件),将未打包的依赖项拷入生成的目录dist下项目文件main中即可。
Error:No such file or directory: '\\librosa\\util\\example_data\\registry.txt'
解决: 直接将librosa下的对应文件复制到dist
三、InstallForge生成安装包
1、General
1.1 General
2、Setup
2.1 Files
添加dist/main/下全部文件,文件可一键添加,文件夹只能手动逐个添加

2.2 Uninstallation
3、Dialogs
3.1 Finish
输入dist/main下可执行文件即可
4、System
4.1 Shortcuts
添加shortcuts

5、Build
输入安装包存储路径及名称
6、点击Build,生成安装包
边栏推荐
- Is it safe for online account managers to open accounts when choosing securities companies in flush
- C语言基础篇 —— 2-5 指针与函数知识点
- Tips and tricks for Neural Networks 深度学习训练神经网络的技巧总结(不定期更新)
- 腾讯撕开中国NFT的“遮羞布”
- Weisfeiler Lehman graph isomorphism test and others
- leetcode-67.二进制求和
- Cuibaoqiu, vice president of Xiaomi group: open source is the best platform and model for human technological progress
- IE盒模型和标准盒模型
- [31. Maze walking (BFS)]
- General paging function
猜你喜欢

二十四节气之大暑

MySQL 啥时候用表锁,啥时候用行锁?

Chen Wei, head of CPU technology ecology of Alibaba pingtouge: the development road of pingtouge

YOLOV7

Lake Shore—EMPX-H2 型低温探针台

JS if the decimal is 0, subtract it, not keep it

Wechat applet wx.hideloading() will close the toast prompt box

微机原理与技术接口课后作业总结

灰色关联分析(MATLAB)

微机原理与技术接口笔记
随机推荐
低代码搭建校园信息化管理系统案例分析
Priyanka Sharma, general manager of CNCF Foundation: read CNCF operation mechanism
数组和特殊矩阵的压缩存储
通用分页功能
Object.defineproperty method, data agent
NodeJs实现token登录注册(KOA2)
距离IoU损失:包围盒回归更快更好的学习(Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression)
VMware虚拟机的三种网络模式
Ie box model and standard box model
IDEA中给项目添加依赖的jar包
Pinduoduo app product details interface to obtain activity_ ID value (pinduoduo activity_id interface)
主成分分析(MATLAB)
Fundamentals of C language -- 2-6 pointers, arrays and sizeof operators
Docker install redis
Tan Zhangxi, director of risc-v Foundation: risc-v has gradually expanded from the edge to the center
泰山OFFICE技术讲座:段落边框的布局绘制分析
Cuibaoqiu, vice president of Xiaomi group: open source is the best platform and model for human technological progress
实时疫情数据可视化分析
Shell | ssh失败原因及解决方法不完全总结
benthos杂记