python 打包exe

pip install pyinstaller
 
pyinstaller -F setup.py 打包exe
pyinstaller -F -w setup.py 不带控制台的打包  (会出错?can not execute script ...)
pyinstaller -F -i xx.ico setup.py 打包指定exe图标打包
 
pyinstall会打包python的各种import包,但是不会打包外部的依赖,比如使用了某个csv文件,需要使用相对路径,把需要的文件也放在一起。
posted @ 2020-10-26 11:31  yjy888  阅读(88)  评论(0编辑  收藏  举报