Pyinstaller安装及使用
安装
pip install pyinstaller
打包
pyinstaller -F -c *.py
-F: 打包成一个文件
-c: 弹出命令行界面
常见问题
ModuleNotFoundError
ModuleNotFoundError: No module named 'pywt._extensions._cwt
在*.spec中的hiddenimports中添加缺少模块,如:
hiddenimports=["pywt","pywt._extensions._cwt"]
然后重新对*.spec文件进行打包
pyinstaller -F -c *.spec
Missing plugin with imread in SKIMAGE
https://github.com/pyinstaller/pyinstaller/issues/3313
You may load I/O plugins with the `skimage.io.use_plugin` command. A list of all available plugins are shown in the `skimage.io` docstring

本文介绍了如何使用PyInstaller安装和打包Python程序,特别针对打包skimage时遇到的Missing plugin问题提供了解决方案,包括在.spec文件中添加隐藏导入和解决依赖问题。

1124

被折叠的 条评论
为什么被折叠?



