PyInstaller“您可以使用`skimage.io.use_plugin`加载I/O插件" [英] PyInstaller "You may load I/O plugins with the `skimage.io.use_plugin`"
问题描述
使用 Pyinstaller 打包一个 python 脚本
useing Pyinstaller packages a python script
pyinstaller 3.2 版
Pyinstaller version 3.2
操作系统:Ubuntu
OS: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
我遇到了上述错误.有人可以告诉我我将如何修复它吗?
I have been getting above error. Could some one please tell me how would i fix it?
推荐答案
问题似乎与这个有关 github 问题,本质上是 skimage.io._plugins
子模块让 Pyinstaller 生活变得艰难.
The problem seems to be related to this github issue, essentially the skimage.io._plugins
submodule is making life hard for Pyinstaller.
为了确保你需要的一切都打包好了,你应该有一个 hook 文件包含
To make sure everything you need is packaged you should have a hook file that contains
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
datas = collect_data_files("skimage.io._plugins")
hiddenimports = collect_submodules('skimage.io._plugins')
(或者,如果您已经有包含这些的钩子文件,请扩展当前的 datas
和 hiddenimports
).
(or if you already have a hook file with these, extend the current datas
and hiddenimports
).
这篇关于PyInstaller“您可以使用`skimage.io.use_plugin`加载I/O插件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!