loris-imageserver / loris

Loris IIIF Image Server
Other
208 stars 87 forks source link

ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory #459

Closed lguariento closed 5 years ago

lguariento commented 5 years ago

Hello,

when running coverage run -m py.test tests/*.py I get the error

from PIL import Image
../lib/python3.7/site-packages/PIL/Image.py:56: in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

What can it be? pip install PIP returns:

Collecting PIL
  ERROR: Could not find a version that satisfies the requirement PIL (from versions: none)
ERROR: No matching distribution found for PIL
alexwlchan commented 5 years ago

That looks like something is trying to load an OpenJPEG binary.

We used to have one in the repo for testing in Linux, but it was removed in 75eff75 in favour of installing the relevant apt package in Travis. Do you have OpenJPEG installed?

We install it in Travis with apt-get install libopenjp2-tools – could you try that, and see if the issue remains?

lguariento commented 5 years ago

Ah, much better - I did yum install openjpeg2 (I'm on CentOS) and now it carries on the tests. I did install libopenjp2 with the source files before. Thanks!

alexwlchan commented 5 years ago

🎉

Glad you got it sorted!