Python 打包exe

打包带走

安装pyinstaller

管理员启动cmd:pip install pyinstaller

卸载:pip uninstall pyinstaller

验证安装:pyinstaller --version

打包exe

进入py文件对应的目录:pyinstaller xxx.py

错误处理

UnicodeDecodeError: 'utf-8' codec can't decode byte

在最开头添加如下声明即可

csharp 复制代码
# -*- coding: latin1 -*-
相关推荐
李帅5151 小时前
用 CPU 做发票识别:从 OCR 文本行到结构化明细表的 4 个硬骨头
python
happylifetree2 小时前
Python79:核心语法-面向对象基础-实例方法
python
贝壳6903 小时前
bool-hybrid-array 9.13.6 偷偷加了个"按键自动升序"的字典,我翻出来测了下
python
艺杯羹3 小时前
MCP本地服务集成避坑:从Stdio管道僵死到双向JSON-RPC稳健通信
人工智能·python·ai·系统架构·大语言模型·ai编程·mcp
happylifetree3 小时前
Python78:核心语法-面向对象基础-类与对象
python
duansamve3 小时前
Python中进程
python
日日大王学编程4 小时前
AI Agent 技术发展历程、演进逻辑与技术范式综述
人工智能·python
春涧草茶4 小时前
慢就是快16-1协程
开发语言·前端·python
5233AI开发笔记5 小时前
API 返回 429:先区分限速、并发和配额,再决定是否重试
python
databook5 小时前
经常听到的透视表是干什么的?
python·数据分析·pandas