-
解压下载的pyinstaller-develop-master.zip,运行cmd进入解压的pyinstaller-develop-master目录
-
拷贝yourprogram.py到pyinstaller-develop-master目录下,运行
python pyinstaller.py -F yourprogram.py #-F打包成一个.exe文件
-
IndexError: tuple index out of range错误的原因为: Python版本不匹配
-
添加图标 -i 图标绝对路径
-
当程序运行存在依赖exe(例如 chromedriver)时,需要将依赖的exe文件拷贝到生成的 yourprogram.exe 所在的目录
参考 https://blog.csdn.net/qq_35614920/article/details/77096238