1. UnicodeDecodeError: 'utf8' codec can't decode byte 0xce in position 47: invalid continuation byte
1.找到报错文件和报错位置,把encoding改为 "ISO-8859-1"
2.命令行输入 chcp 65001
最后 pyinstaller -F 文件地址+文件名
2. 需要装的依赖包有:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5
pip install -U pillow
pip install skimage
3.pyinstaller 打包后运行exe程序出现的"ModuleNotFindError":
使用pyinstaller 打包生成”.spec” 文件
接下来,使用文本编辑器打开”.spec”文件,在 hiddenimport=[]
部分添加缺少的module,
我的程序中缺少的是 pywt 模块,因而添加:
hiddenimports=[
'skimage.io._plugins','pywt','pywt._extensions._cwt']
然后使用pyinstaller 生成新的exe程序:
pyinstaller my.spec
参考:
https://blog.csdn.net/zyc121561/article/details/79562935