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文件,需要使用相对路径,把需要的文件也放在一起。
原文地址:https://www.cnblogs.com/yjybupt/p/13877605.html