You need to sign in to view this topic
This topic created in 2972 days ago, the information mentioned may be changed or developed.
大侠们,你们好,小弟请教一个问题
1:请问如何用 pyinstaller 打包 python 源文件里有打开和加载某个预定的 dat 文件?
2:还有就是 pyinstaller 打包的文件基本超过 5M 了。请问有什么办法或者什么模块把生成的文件变小一些吗?
6 replies • 2018-04-21 21:01:01 +08:00
 |
|
1
shootsoft Apr 20, 2018 via iPhone
1. 有参数可以指定打包额外的目录作为资源文件, 2. 没办法,因为 python 本身的体积在那摆着呢。可以尝试启用 upx
|
 |
|
2
chesterzzy Apr 20, 2018
多年前,我也曾尝试打包 Python 的程序为一个 exe
最后,我放弃了
还是用合适的工具做合适的事吧
|
 |
|
3
omph Apr 21, 2018
楼上说的对,我转 PS 了
|
 |
|
6
hititan Apr 21, 2018
感谢楼上的回复,真心感谢。
|