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 p