最近要把绿盟报告导出脚本打包成一个exe,原本是一个py2的文件Vulreport.py,我做了如下步骤。 1、py2topy3 Python3 2to3.py -w Vulreport.py 2、py2打包exe 3、py3打包exe 安装pyinstaller,安装指令: pip install pyinstaller 打包exe pyinstaller -F Vulreport_py3.py 同目录下生成dist目文件夹,打包好的exe就在里边 双击运行