Wand==0.3.7, Python 3.4.3, OSX EI Capitan 10.11
when run from wand.image import Image
it throw errors:
ImportError: MagickWand shared library not found. You probably had not installed ImageMagick library. Try to install: brew install freetype imagemagick
ok, first I try this:
brew install freetype imagemagick
, but
Warning: freetype-2.6_1 already installed Warning: imagemagick-6.9.2-4 already installed
what's the fuck?
run convert -h
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /usr/local/bin/convert Reason: Incompatible library version: convert requires version 19.0.0 or later, but libfreetype.6.dylib provides version 16.0.0 Trace/BPT trap: 5
Ok, Incompatible library version, I got you!
brew uninstall freetype imagemagick
brew install freetype
brew link --overwrite freetype
brew install imagemagick
If setting
export MAGICK_HOME=/opt/homebrew/opt/imagemagick
didn't work, then re-open your terminal, runecho $MAGICK_HOME
. If nothing shows up, here is what you can do:.bash_profile
(or.zshrc
).export MAGICK_HOME=/opt/homebrew/opt/imagemagick
.source ~/.bash_profile
(or.zshrc
) to apply changes.If you need a quick fix in Python instead of permanently change your system variables, use this snippet:
This Python code only sets
MAGICK_HOME
temporarily during the script runtime. For a permanent fix, update your shell profile as described above.