ftarlao / check-media-integrity

check-media-integrity is a command line tool that checks the integrity of specific media files (pictures, video, audio) or all the media files in subfolders, recursively.
GNU General Public License v3.0
160 stars 31 forks source link

ImportError: MagickWand shared library not found #6

Closed shivanraptor closed 3 years ago

shivanraptor commented 3 years ago

I had ImageMagick installed, but the script still complains ImportError: MagickWand shared library not found.

python check_mi.py /Users/adv/Desktop/error.jpg 
Traceback (most recent call last):
  File "/Users/adv/Downloads/check-media-integrity-master/.venv/lib/python3.9/site-packages/wand/api.py", line 184, in <module>
    libraries = load_library()
  File "/Users/adv/Downloads/check-media-integrity-master/.venv/lib/python3.9/site-packages/wand/api.py", line 139, in load_library
    raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
OSError: cannot find library; tried paths: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/adv/Downloads/check-media-integrity-master/check_mi.py", line 20, in <module>
    from wand.image import Image as ImageW
  File "/Users/adv/Downloads/check-media-integrity-master/.venv/lib/python3.9/site-packages/wand/image.py", line 20, in <module>
    from .api import MagickPixelPacket, libc, libmagick, library
  File "/Users/adv/Downloads/check-media-integrity-master/.venv/lib/python3.9/site-packages/wand/api.py", line 208, in <module>
    raise ImportError('MagickWand shared library not found.\n'
ImportError: MagickWand shared library not found.
You probably had not installed ImageMagick library.
Try to install:
  brew install freetype imagemagick

brew install result:

% brew install imagemagick
Warning: imagemagick 7.1.0-0 is already installed and up-to-date.
% brew install freetype   
Warning: freetype 2.10.4 is already installed and up-to-date.
ftarlao commented 3 years ago

I suppose that library installation in iOS put shared libs in a path where the python module does not "look". In fact, there is a question here where they suggest for the "brew" case to add a symbolic link: https://stackoverflow.com/a/41772062/1052899 It's a python wand vs iOS module issue...

shivanraptor commented 3 years ago

I suppose that library installation in iOS put shared libs in a path where the python module does not "look". In fact, there is a question here where they suggest for the "brew" case to add a symbolic link: https://stackoverflow.com/a/41772062/1052899 It's a python wand vs iOS module issue...

Thanks it fixed the issue.