Python 将python工程打包成 .exe

一,pyInstaller安装配置

1,打开网址:http://www.pyinstaller.org/downloads.htmlhtml

     pip 安装方式:python

cd D:\Program Files (x86)\Python37\Scripts
pip3 install install pyinstaller

  

2. 安装 pywin32. https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/post

   1) 下载安装,程序会自动检测 python 安装的目录。ui

   2).net

python pywin32_postinstall.py -install

 

二,生成 exe 文件

1. 将python工程文件夹复制到 D:\Program Files (x86)\Python37\Scripts 目录下,3d

python3 pyinstaller-script.py -F "D:\Program Files (x86)\Python37\Scripts\Gen-strategycfg\CreateStrategyFolder.py"

  

 

Gen-strategycfg: python 工程文件夹build: 生成的中间文件dist: 最终生成的 exe 文件备注: 若是生成过程当中有问题,能够将 build 下相关的文件删除,从新运行 生成 命令
相关文章
相关标签/搜索