将python中的代码转为可执行文件

先在cmd里安装:
pip install pywin32
pip install PyInstaller

 

 

在官网下载pyinstaller:(注意下载3.5-3.7下面的)

http://www.pyinstaller.org/downloads.html

 

 

下载包解压放在E:\Tools\pyinstall\下

 

 


将py文件放在pyinstaller-pyinstaller-99c6e8b下

 

 ----准备工作完事,下面开始执行----

C:\Users\lingling.luo.TCENT>e:

E:\>cd Tools/pyinstall/

E:\Tools\pyinstall>cd pyinstaller-pyinstaller-99c6e8b
E:\Tools\pyinstall\pyinstaller-pyinstaller-99c6e8b>python pyinstaller.py -F FileTest.py

执行完之后会在\pyinstaller-pyinstaller-99c6e8b\FileTest\dist下生成一个exe文件

然后再把需要的其他文件进去 点击就ok了

 

posted @ 2020-09-28 14:41  MLing  阅读(735)  评论(0编辑  收藏  举报