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 -*-
相关推荐
05664611 小时前
agent学习Day15——SQLAlchemy 查询过滤、分页与历史列表接口
python·学习·fastapi
程序员爱德华12 小时前
Python与C++:异同点对比
c++·python
hangyuekejiGEO12 小时前
GEO技术服务选型指南
大数据·人工智能·python
软萌萌的113 小时前
Java Spring Boot 修改yml配置&加载顺序规则
java·spring boot·python
Dxy123931021614 小时前
Linux 编译安装 Python 3.12.10(多版本共存,不破坏系统Python)
linux·运维·python
持敬chijing15 小时前
Python概述
开发语言·python
赤羽尾风17 小时前
NumPy快速入门
python·numpy
倒流时光三十年17 小时前
第三阶段 26 · highlight 高亮(返回命中片段)
后端·python·django
久久学姐19 小时前
Python+Playwright+Pytest+BDD,用FSM打造高效测试框架
python·pytest·bdd·playwright·fsm