problem with io.imread
Julien Derr
julien.derr at gmail.com
Sat May 2 08:06:05 EDT 2015
Thanks everyone for all the answers,
I tried to desinstal reinstall with many variations. my last choice was :
scikit-image==0.12dev
easy_install -U scikit-image
I tried your option; with plugin='matplotlib' and still get the following
error message, so it looks like I have indeed a problem with a jpeg
decoder, but I checked that
I have the package libjpeg8 installed already.
Traceback (most recent call last):
File "test.py", line 17, in <module>
rgb=io.imread(cheminfichier,plugin='matplotlib')
File
"/usr/local/lib/python2.7/dist-packages/scikit_image-0.12dev-py2.7-linux-x86_64.egg/skimage/io/_io.py",
line 100, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File
"/usr/local/lib/python2.7/dist-packages/scikit_image-0.12dev-py2.7-linux-x86_64.egg/skimage/io/manage_plugins.py",
line 207, in call_plugin
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line
2215, in imread
return _imread(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line
1254, in imread
im = pilread(fname)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line
1235, in pilread
return pil_to_array(image)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line
1344, in pil_to_array
x = toarray(im)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line
1327, in toarray
x_str = im.tobytes('raw', im.mode)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 661, in
tobytes
self.load()
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 203,
in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 419, in
_getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
On Wednesday, April 29, 2015 at 6:21:21 PM UTC+2, Julien Derr wrote:
>
> Hi everyone,
> I have a very basic problem, but I have no idea how to solve it !
> I installed scikitimage on a new computer, and I cannot manage to load an
> image with the io module
>
> from skimage import io, works fine :
>
> Variable Type Data/Info
> ------------------------------
> filename str ./small.jpg
> io module <module 'skimage.io'
> from<...>skimage/io/__init__.pyc'>
>
> but when I want to load my image: I get the error
>
> In [5]: camera = io.imread(filename)
>
> ValueError: Could not load "./small.jpg"
> Please see documentation at:
> http://pillow.readthedocs.org/en/latest/installation.html#external-libraries
>
>
> I went on the website where they ask to unistall PIL before installing
> pillow, this is what I did, and still I get the error ...
>
> any ideas ?
>
>
> thanks a lot!
>
> Julien
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150502/8989f8b6/attachment.html>
More information about the scikit-image
mailing list