[Numpy-discussion] תשובה: [OT] any image io module that works with python3?

Nadav Horesh nadavh@visionsense....
Mon Mar 14 02:55:57 CDT 2011

The instillation is OK. The problem is that on my wok PC I do not have PIL installed. So:
In [6]: import scikits.image.io as io
ImportError                               Traceback (most recent call last)
/home/nadav/<ipython-input-6-62f17e91233f> in <module>()
----> 1 import scikits.image.io as io

/usr/lib64/python3.1/site-packages/scikits.image-0.3dev-py3.1-linux-x86_64.egg/scikits/image/io/__init__.py in <module>()
     11 # Add this plugin so that we can read images by default

     12 use_plugin('null')
---> 13 use_plugin('pil')
     15 from .sift import *

/usr/lib64/python3.1/site-packages/scikits.image-0.3dev-py3.1-linux-x86_64.egg/scikits/image/io/_plugins/plugin.py in use(name, kind)
    123     if not name in available(loaded=True):
--> 124         _load(name)
    126     for k in kind:

/usr/lib64/python3.1/site-packages/scikits.image-0.3dev-py3.1-linux-x86_64.egg/scikits/image/io/_plugins/plugin.py in _load(plugin)
    178         modname = plugin_module_name[plugin]
    179         plugin_module = __import__('scikits.image.io._plugins.' + modname,
--> 180                                    fromlist=[modname])
    182     provides = plugin_provides[plugin]

/usr/lib64/python3.1/site-packages/scikits.image-0.3dev-py3.1-linux-x86_64.egg/scikits/image/io/_plugins/pil_plugin.py in <module>()
      6     from PIL import Image
      7 except ImportError:
----> 8     raise ImportError("The Python Image Library could not be found. "
      9                       "Please refer to http://pypi.python.org/pypi/PIL/ "
     10                       "for further instructions.")

ImportError: The Python Image Library could not be found. Please refer to http://pypi.python.org/pypi/PIL/ for further instructions.

Shouldn't it skip quietly on missing plugins?
(It is easy to bypass by a patch, but  I am sure you has some design considerations here.


-----הודעה מקורית-----
מאת: numpy-discussion-bounces@scipy.org [mailto:numpy-discussion-bounces@scipy.org] בשם Stéfan van der Walt
נשלח: Monday, March 14, 2011 00:16
אל: Discussion of Numerical Python
נושא: Re: [Numpy-discussion] [OT] any image io module that works with python3?

Hi Nadav

On Sun, Mar 13, 2011 at 8:20 PM, Nadav Horesh <nadavh@visionsense.com> wrote:
> Jest tested the installation (after git clone ...). I had to correct the following lines in _build.py to pass installation:
> lines 72, and 75 should be:
>    f0 = open(f0,'br')
>    f1 = open(f1,'br')

Thanks so much for testing and for the patch; I've pushed your changes:


Are you able to load images now?

NumPy-Discussion mailing list

More information about the NumPy-Discussion mailing list