[英]How to use or install MagickWand on Mac OS X?
I have problem with magickwand and python and Mac OX X.我对 magickwand 和 python 以及 Mac OX X 有疑问。
When I'm importing it I get the error:当我导入它时出现错误:
ImportError: MagickWand shared library not found. You probably had not
installed ImageMagick library. Try to install: brew install imagemagick
brew install imagemagick Warning: imagemagick-6.8.9-1 already installed
To get Wand working with imagemagick 7:要让 Wand 与 imagemagick 7 一起工作:
brew install imagemagick
echo 'export MAGICK_HOME=/opt/homebrew/opt/imagemagick/' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/imagemagick/bin:$PATH"' >> ~/.zshrc
brew uninstall --force imagemagick
brew install imagemagick@6
echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.bash_profile
brew link imagemagick@6 --force
So, the actual problem is : 所以,实际问题是:
If your Python in not installed using MacPorts, you have to export MAGICK_HOME path as well.
如果未使用MacPorts安装Python,则还必须导出MAGICK_HOME路径。 Because Python that is not installed using MacPorts doesn't look up /opt/local, the default path prefix of MacPorts packages.
因为未使用MacPorts安装的Python不查找/ opt / local,所以MacPorts包的默认路径前缀。
And the solution they provide is : 他们提供的解决方案是:
$ export MAGICK_HOME=/opt/local
$ export MAGICK_HOME = / opt / local
Based on Gowtham's & jrjc's answers, here's how I got the Wand python package to work using homebrew: 基于Gowtham和jrjc的答案,这里是我如何使用自制软件使用Wand python包:
brew install imagemagick@6
echo 'export MAGICK_HOME=/usr/local/opt/imagemagick@6/' >> ~/.bash_profile
There's a few things to note here: 这里有几点需要注意:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.