pyinstaller

安装

pip install Pyinstaller

打包命令

pyinstaller -F -i ./logo.ico test.py

图标在线转换地址(http://www.zuohaotu.com/image-to-ico.aspx)

打包完成的exe在dist目录下


pipenv

pip install pipenv
# 需要设置环境变量
# C:\Users\username\AppData\Local\Programs\Python\Python37\Scripts
#建立虚拟环境
pipenv install
#进入虚拟环境
pipenv shell
#安装模块
pip install 小工具.py里面用到的模块(requeses,pandas等)
#打包的模块也要安装
pip install pyinstaller
#开始打包
pyinstaller -F -i C:/Users/username/Desktop/test2/logo.ico C:/Users/username/Desktop/test2/test.py

# test.py: 代码
# logo.ico: logo文件

在虚拟环境内打包,exe的包大小会小很多

 posted on 2022-06-09 14:34  Rannie`  阅读(56)  评论(0编辑  收藏  举报
去除动画
找回动画