IIIF / image-validator

Validator for the Image API
http://iiif.io/api/image/validator/
Apache License 2.0
35 stars 20 forks source link

problem with iiif validator version 1.0.4: module image not found #59

Closed tobiasschweizer closed 5 years ago

tobiasschweizer commented 7 years ago

Hi

I had a problem when running iiif validator version 1.0.4 (MacOS Sierra): "ModuleNotFoundError: No module named 'Image'"

For details, please see: https://github.com/dhlab-basel/Sipi/pull/215#issuecomment-339950721

Updating Pillow to Pillow (4.3.0) fixed the issue: "pip3 install --upgrade pillow"

However, this was not obvious to me. If found this post that helped me fix the issue: https://stackoverflow.com/questions/42317641/pil-library-not-loaded-opt-local-lib-libjpeg-9-dylib

greets

Tobias

tobiasschweizer commented 7 years ago

I tried to reinstall iiif validator first, and I had the required version of PILLOW:

Requirement already satisfied: Pillow<4.0.0,>=3.2.0

https://github.com/IIIF/image-validator/blob/9ca94d7dbf46bd8ce9afd7956094137bd1ff246b/setup.py#L47

tobiasschweizer commented 7 years ago

I use Python3

zimeon commented 6 years ago

Seems that this is probably related to the 2.6 support issues/setup and #50

hugovk commented 6 years ago

https://github.com/IIIF/image-validator/pull/58 has been merged, which fixes #50, and removes the upper version limit of Pillow.

@tobiasschweizer Please can you retest with latest master of image-validator?

tobiasschweizer commented 6 years ago

I am not sure I can reproduce this since I have already upgraded pillow.

However, I can try running our tests with the latest version of iiif-validator (https://dhlab-basel.github.io/Sipi/documentation/building.html#prerequisites).

I will keep you posted!

tobiasschweizer commented 6 years ago

Sorry, a naive question: do you want me to clone the repo and manually install iiif_validator as described here : https://github.com/IIIF/image-validator#manual-installation?

So far, I just used pip3.

hugovk commented 6 years ago

Yes, that's one way.

This might also do it:

pip3 install -U git+https://github.com/IIIF/image-validator.git
tobiasschweizer commented 6 years ago

Ok, I removed my existing installation of iiif_validator first. Pillow was at version 3.4.2

pip3 install -U git+https://github.com/IIIF/image-validator.git
Collecting git+https://github.com/IIIF/image-validator.git
  Cloning https://github.com/IIIF/image-validator.git to /var/folders/zp/x9myt6dn3x1fnkky4w8k_mp00000gn/T/pip-_fv1qppy-build
Collecting Pillow>=3.2.0 (from iiif-validator==1.0.5)
  Downloading Pillow-4.3.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.5MB)
    100%  3.6MB 493kB/s 
Requirement already up-to-date: bottle>=0.12.1 in /usr/local/lib/python3.5/site-packages (from iiif-validator==1.0.5)
Requirement already up-to-date: python-magic>=0.4.12 in /usr/local/lib/python3.5/site-packages (from iiif-validator==1.0.5)
Requirement already up-to-date: lxml>=3.7.0 in /usr/local/lib/python3.5/site-packages (from iiif-validator==1.0.5)
Collecting olefile (from Pillow>=3.2.0->iiif-validator==1.0.5)
  Downloading olefile-0.44.zip (74kB)
    100% 81kB 9.9MB/s 
Building wheels for collected packages: olefile
  Running setup.py bdist_wheel for olefile ... done
  Stored in directory: /Users/.../Library/Caches/pip/wheels/20/58/49/cc7bd00345397059149a10b0259ef38b867935ea2ecff99a9b
Successfully built olefile
Installing collected packages: olefile, Pillow, iiif-validator
  Found existing installation: Pillow 3.4.2
    Uninstalling Pillow-3.4.2:
      Successfully uninstalled Pillow-3.4.2
  Running setup.py install for iiif-validator ... done
Successfully installed Pillow-4.3.0 iiif-validator-1.0.5 olefile-0.44

Pillow got automatically updated to 4.3.0 now.

I ran our automated tests that use iiif_validator and they worked fine.

Before I had to update Pillow manually to make it work. Now this happened automatically. I think we are fine.

Again I used a Mac on macOS Sierra 10.12.6 (but I think I had the original issue on may MacBook Air which runs the same OS).

glenrobson commented 5 years ago

Closing as this looks fixed.