使用python写出exe程序

step1 下载pyinstaller 链接地址http://www.pyinstaller.org/downloads.html

打开地址结果如上图,step2进行安装;

step2:安装pyinstaller

解压文件,复制pyinstaller文件夹中setup.py所在的路径

打开win命令行cmd窗口 进入到刚才复制的地址路径

执行命令 python setup.py install

静静的抽根烟,直到看到finished processing dependencies for ...

step3:使用

cmd进入到需要打包成exe程序的py脚本目录下

执行命令pyinstaller -F hello.py

最后会在hello.py的同级目录下生成一个dist文件夹

打开会看到

我兴奋的打开了hello.exe 窗口一闪而过,并不是我想要的!

原文地址:https://www.cnblogs.com/yuanhailiang/p/8972361.html