gpt4 book ai didi

python - PyInstaller "You may load I/O plugins with the ` skimage.io.use_plugin`"

转载 作者:行者123 更新时间:2023-11-28 17:30:24 27 4
gpt4 key购买 nike

使用Pyinstaller打包一个python脚本

Pyinstaller 版本 3.2

操作系统:Ubuntu

Traceback (most recent call last):
File "<string>", line 57, in <module>
File "<string>", line 29, in feature_extract
File "caffe/io.py", line 295, in load_image
File "skimage/io/_io.py", line 100, in imread
File "skimage/io/manage_plugins.py", line 194, in call_plugin
RuntimeError: No suitable plugin registered for imread.

You may load I/O plugins with the `skimage.io.use_plugin` command. A list of all available plugins can be found using `skimage.io.plugins()`.
file_test returned -1

我遇到了上述错误。有人可以告诉我如何解决吗?

最佳答案

问题好像和这个github issue有关,本质上是 skimage.io._plugins 子模块让 Pyinstaller 的日子不好过。

为确保您需要的一切都已打包,您应该有一个 hook file包含

from PyInstaller.utils.hooks import collect_data_files, collect_submodules

datas = collect_data_files("skimage.io._plugins")
hiddenimports = collect_submodules('skimage.io._plugins')

(或者,如果您已经有了包含这些的 Hook 文件,请扩展当前的 datashiddenimports)。

关于python - PyInstaller "You may load I/O plugins with the ` skimage.io.use_plugin`",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34761862/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com