Error installing pythonmagick , ImportError: No module named PythonMagick

2.3k Views Asked by At

I am trying to install pythonmagick on OSX (High Sierra).

I followed DwishR's instructions here: https://gist.github.com/tomekwojcik/2778301 Downloaded pythonmagick from here: http://www.imagemagick.org/download/python/ Modified BOOST_ROOT=/usr/local/Cellar/boost/1.66.0/ and the make files.

See my install procedure here: https://gist.github.com/anonymous/d2eab85b89fd7be33efa40bf3cb1015e

However, you can see that pythonmagick is not working at the end. What did I do wrong?

2

There are 2 best solutions below

1
scenox On BEST ANSWER

Please check which python is used. It looks like you are using the system python which is not using /usr/local/lib/python2.7/site-packages/. You might want to install python2 with brew: brew install python@2.

1
fpietka On

This seems to be a rather old package, missing what it needs to be installed with pip.

Take a look at this issue: https://github.com/pypa/pip/issues/4629#issuecomment-317844966

I quote:

PythonMagick is on PyPi, but there are no source distribution, eggs, or wheels provided, so it can't be installed. PythonMagickWand as an egg, but only for Python 2.5!

I see you are using OSX High Sierra, so your current version of Python 2 is 2.7. You could try building a virtualenv using pyenv and python 2.5, but maybe pgmagick would be a suitable replacement?