当前位置:网站首页>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,生成安装包
边栏推荐
- JS if the decimal is 0, subtract it, not keep it
- 【Flutter -- 布局】弹性布局(Flex 和 Expanded)
- Wechat applet class binding, how to bind two variables
- Scale Match for Tiny Person Detection
- Eureka notes
- iphone 无法打开openv**文件的解决方案
- JMeter之函数二次开发/插件开发(细版)
- 已解决(selenium 操作火狐Firefox浏览器报错)AttributeError: ‘WebDriver’ object has no attribute ‘execute_cdp_cmd’
- Royal O'Brien, executive director of o3df: open source has no boundaries, and all shared sounds will become the actual direction
- Distance IOU loss: faster and better learning for bounding box regression
猜你喜欢
随机推荐
【mysql集群故障恢复】
mysql如何查询不在数据库里的数据?
Fundamentals of C language -- 2-5 points of knowledge about pointers and functions
General paging function
分类模型——逻辑回归、Fisher线性判别(SPSS)
JMeter之函数二次开发/插件开发(细版)
二十四节气之大暑
启牛商学院上面开户安全不
IE盒模型和标准盒模型
Bag of tricks for image classification "with convolutional neural networks"
Detector: detect objects with recursive feature pyramid and switchable atolos convolution
微机原理与技术接口课后作业总结
Cuibaoqiu, vice president of Xiaomi group: open source is the best platform and model for human technological progress
AutoCAD进阶操作
已解决(selenium 操作火狐Firefox浏览器报错)AttributeError: ‘WebDriver’ object has no attribute ‘execute_cdp_cmd’
Object.defineProperty方法、数据代理
Weisfeiler Lehman graph isomorphism test and others
Ie box model and standard box model
主成分分析(MATLAB)
sprintf和cv::putText









