Wand install: TypeError: bad argument type for built-in operation
Question: System: Windows 7 Professional 64-bit

Python 3.5.0 |Anaconda 2.4.0 (64-bit)

ImageMagick-6.9.2-Q16 installed and runs standalone.

pip install wand successful

[1]:import wand #imports OK

[2]:from wand.image import Image

. . . TypeError: bad argument type for built-in operation

MAGICK_HOME env is set correctly. I manually added the ImageMagick directories
to PATH

Any idea on how to resolve?


Answer: I'm not around windows, but I would assume you would do could set
`MAGICK_HOME` at the system, user, session, or runtime level.

For runtime, it might be as simple as updating your python script

    
    
    import os
    os.environ["MAGICK_HOME"] = "C:\ImageMagick-X.Y.Z"
    from wand.image import Image
    

For a [cmd](/questions/tagged/cmd "show questions tagged 'cmd'") session, run
the following before executing the python script.

    
    
    setx MAGICK_HOME "C:\ImageMagick-X.Y.Z"
    

> Note: The path should be a absolute system path to the root-directly of your
> ImageMagick installation.

