python打包工具PyInstaller

安装PyInstaller


pip install pyinstaller



使用PyInstaller

pyinstaller [options] script [script ...] | specfile



1pyinstaller mypython.py
两个目录build和dist,dist下面的文件就是可以发布的可执行文件,对于上面的命令你会发现dist目录下面有一堆文件,各种都动态库文件和myscrip可执行文件。有时这样感觉比较麻烦,需要打包dist下面的所有东西才能发布


2

单文件模式

pyinstaller -F mypython.py

猜你喜欢

转载自blog.csdn.net/qq_37786775/article/details/80384281