3

useing Pyinstaller packages a python script

Pyinstaller version 3.2

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?

james chang
  • 53
  • 1
  • 6

1 Answers1

2

The problem seems to be related to this github issue, essentially the skimage.io._plugins submodule is making life hard for Pyinstaller.

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')

(or if you already have a hook file with these, extend the current datas and hiddenimports).

Michael Mauderer
  • 3,777
  • 1
  • 22
  • 49