Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scikit-image #806

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add scikit-image #806

wants to merge 8 commits into from

Conversation

certik
Copy link
Member

@certik certik commented Jul 6, 2015

It installs.

certik and others added 8 commits May 1, 2015 13:00
This fixes the following error:

In [1]: from PIL import Image
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-0f6709e38f49> in <module>()
----> 1 from PIL import Image

/home/ondrej/.hashdist/bld/profile/ikoe5ngrnono/lib/python2.7/site-packages/PIL/Image.py in <module>()
     61     # Also note that Image.core is not a publicly documented interface,
     62     # and should be considered private and subject to change.
---> 63     from PIL import _imaging as core
     64     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
     65         raise ImportError("The _imaging extension was built for another "

ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
@certik
Copy link
Member Author

certik commented Jul 6, 2015

I fixed lots of different errors, but this one still remains, when using it on scipy 2015 tutorials, the following code needs to work (this is called inside scikit-image):

In [3]: from PIL import Image

In [5]: a = Image.open("images/spice_1.jpg")

In [7]: from io import BytesIO

In [9]: b = BytesIO()

In [10]: a.save(b, "PNG")
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-10-7850474bd2ff> in <module>()
----> 1 a.save(b, "PNG")

/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/Image.pyc in save(self, fp, format, **params)
   1669 
   1670         # may mutate self!
-> 1671         self.load()
   1672 
   1673         save_all = False

/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/ImageFile.pyc in load(self)
    201 
    202             for d, e, o, a in self.tile:
--> 203                 d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
    204                 seek(o)
    205                 try:

/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/Image.pyc in _getdecoder(mode, decoder_name, args, extra)
    418         return decoder(mode, *args + extra)
    419     except AttributeError:
--> 420         raise IOError("decoder %s not available" % decoder_name)
    421 
    422 

IOError: decoder jpeg not available

Note that PIL now links with openjpeg correctly (the commits above make that work):

$ ldd /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/*.so
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/_imagingft.so:
    linux-vdso.so.1 =>  (0x00007ffe11377000)
    libfreetype.so.6 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../freetype/yyxa7627ngek/lib/libfreetype.so.6 (0x00007f946f06c000)
    libpython2.7.so.1.0 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../python/7h32ksdqcejo/lib/libpython2.7.so.1.0 (0x00007f946ec63000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f946ea21000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f946e65c000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f946e435000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f946e230000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f946e02d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f946dd26000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f946f50f000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f946db0d000)
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/_imagingmath.so:
    linux-vdso.so.1 =>  (0x00007fff49396000)
    libpython2.7.so.1.0 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../python/7h32ksdqcejo/lib/libpython2.7.so.1.0 (0x00007f8e24adb000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8e24898000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8e244d3000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8e242ce000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f8e240ca000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8e23dc4000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8e250ec000)
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/_imagingmorph.so:
    linux-vdso.so.1 =>  (0x00007fffcb7e1000)
    libpython2.7.so.1.0 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../python/7h32ksdqcejo/lib/libpython2.7.so.1.0 (0x00007f5d7bbfe000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5d7b9bb000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5d7b5f6000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5d7b3f1000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f5d7b1ed000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5d7aee7000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5d7c20c000)
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/_imaging.so:
    linux-vdso.so.1 =>  (0x00007ffca87f3000)
    libopenjp2.so.7 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../openjpeg/6azwtldpgrmo/lib/libopenjp2.so.7 (0x00007f4f844ad000)
    libz.so.1 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../zlib/v6anirfvk2op/lib/libz.so.1 (0x00007f4f84292000)
    libpython2.7.so.1.0 => /home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/../../../../../../python/7h32ksdqcejo/lib/libpython2.7.so.1.0 (0x00007f4f83e8a000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4f83c48000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4f83882000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4f8357c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4f83376000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f4f83173000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4f84958000)

I reported the error upstream: python-pillow/Pillow#1338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants