How to install python imagemagick at windows 7. I followed these instruction

python_dev picture python_dev · Sep 28, 2012 · Viewed 17.3k times · Source

To install python IMagick binding wand api on windows 64 bit (python 2.6)

This is what I did:

  1. downloaded and installed ImageMagick-6.5.8-7-Q16-windows-dll.exe

  2. downloaded wand module from http://pypi.python.org/pypi/Wand

  3. after that i ran python setup.py install from wand directory,

  4. then i executed step6. but i got the import error: magickband librarry not found

  5. downloaded magickwand' module and executed 'python setup.py install' from magickwand directory.

  6. then agian i tried this code

    from wand.image import Image
    from wand.display import display
    
    with Image(filename='mona-lisa.png') as img:
        print img.size
        for r in 1, 2, 3:
            with img.clone() as i:
                i.resize(int(i.width * r * 0.25), int(i.height * r * 0.25))
                i.rotate(90 * r)
                i.save(filename='mona-lisa-{0}.png'.format(r))
                display(i)
    
  7. but thereafter again i am getting the same import error magickband library not found i am fed up with this coz i have done with all the installation. but not able to execute the code. coz everytime i am getting magickband libraray..import error.

Answer

minhee picture minhee · Nov 19, 2012

You have to set MAGICK_HOME environment variable first. See the last part of this section.


(source: wand-py.org)

>

Lastly you have to set MAGICK_HOME environment variable to the path of ImageMagick (e.g. C:\Program Files\ImageMagick-6.7.7-Q16). You can set it in Computer ‣ Properties ‣ Advanced system settings ‣ Advanced ‣ Environment Variables....