如何使用pyinstaller打包python文件为exe文件

发布网友 发布时间:2022-04-20 15:46

我来回答

1个回答

热心网友 时间:2022-04-18 09:38

1、安装。使用PyInstaller需要安装PyWin32。下载与Python对应的PyInstaller版本,
解压后就算安装好了
。2、生成exe文件。Python程序的目录为
F:\hello.py3、在命令行
中进入pyinstaller所在的目录,运行python
pyinstaller.py
F:\hello.py
4、在PyInstaller-2.1目录下,生成文件夹hello5、hello目录下有文件,exe文件在dist目录下6、如果将python文件复制到
pyinstaller.py
所在目录下,则运行
python
pyinstaller.py
hello.py
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com