您的当前位置:首页如何将多个py文件打包成exe格式
如何将多个py文件打包成exe格式
来源:锐游网
1、首先安装pyinstaller
pip install pyinstaller
3、为程序运行单独创建一个环境(我的是tf2)cmd先激活工作环境
conda activate tf2
4、多个.py文件打包格式如下
pyinstaller [主文件] -p [其他文件1] -p [其他文件2] --hidden-import [自建模块1] --hidden-import [自建模块2]
pyinstaller -F -w main.py -p enterTest1.py -p enterTest2.py -p test1.py -p test2.py --hidden-import enterTest1 --hidden-import enterTest2 --hidden-import test1 --hidden-import test2
会在相同文件夹内生成一下两个文件
因篇幅问题不能全部显示,请点此查看更多更全内容