《Pyinstaller打包教程》常见错误处理

其他pyinstaller打包技巧见Python程序打包指南

文章目录

    • 1、 `utf-8' codec can't decode byte 0xce in position`
    • 2、`各种路径错误导致的问题`

1、 utf-8' codec can't decode byte 0xce in position

# 若出现上述错误,则输入以下命令
chcp 65001

这是由于cmd的编码格式导致的。在命令窗口输入chcp 65001,再输入打包命令即可!

2、各种路径错误导致的问题

很多人在拼接路径的时候喜欢使用+来拼接路径字符串,这会导致在打包后出现各种资源无法访问的错误,且不好排查,建议多使用os.path的各种方法来处理路径。

 
 

你可能感兴趣的:(python打包实战,python,windows,pyinstaller)