To install python IMagick binding wand api on windows 64 bit (python 2.6)
This is what I did:
downloaded and installed ImageMagick-6.5.8-7-Q16-windows-dll.exe
downloaded wand
module from http://pypi.python.org/pypi/Wand
after that i ran python setup.py install
from wand
directory,
then i executed step6. but i got the import error: magickband librarry not found
downloaded magickwand' module and executed 'python setup.py install' from magickwand directory.
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)
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.
Installation on Windows: You could build ImageMagick by yourself, but it requires a build toolchain like Visual Studio to compile it. The easiest way is simply downloading a prebuilt binary of ImageMagick for your architecture (win32 or win64).
Install ImageMagick extension: Now install the ImageMagick PHP extension by using the following command. Install Imagick extension: After completion of ImageMagick package, the Imagick PHP extension will install. Restart Apache Server: Restart the apache server by using the following command.
ImageMagick is already available for utilization on the servers. It is located at: /usr/bin/convert. /usr/bin/mogrify.
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....
First i had to install ImageMagic and set Envrioment Variable MAGIC_HOME
,just after i was able to install Wand
from pip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With