I am trying to run the example code on my machine to convert a raw file to a DNG and I'm getting an error about the wand import not being found
import asyncio
import sys
from pydngconverter import DNGConverter, flags
async def main():
# Create converter instance.
pydng = DNGConverter(
sys.argv[1],
dest="/dngfiles",
jpeg_preview=flags.JPEGPreview.EXTRACT,
fast_load=True,
)
# Convert all
return await pydng.convert()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
python dngconvert.py public/test.ARW
/Users/flynn/Documents/labs/pixellabs/pixel/dngconvert.py:18: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
[10:41:18] INFO pydngconverter.utils: resolved executable for: Adobe DNG Converter @ /Applications/Adobe compat.py:151
DNG Converter.app/Contents/MacOS/Adobe DNG Converter
INFO pydngconverter.utils: resolved executable for: exiftool @ /opt/homebrew/bin/exiftool compat.py:151
Traceback (most recent call last):
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/api.py", line 154, in <module>
libraries = load_library()
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/api.py", line 143, in load_library
raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
OSError: cannot find library; tried paths: []
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/pydngconverter/main.py", line 17, in <module>
from wand.image import Image
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/image.py", line 18, in <module>
from . import assertions
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/assertions.py", line 155, in <module>
from .color import Color # noqa: E402
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/color.py", line 10, in <module>
from .api import library
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/wand/api.py", line 178, in <module>
raise ImportError('MagickWand shared library not found.\n'
ImportError: MagickWand shared library not found.
You probably had not installed ImageMagick library.
Try to install:
brew install freetype imagemagick
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/flynn/Documents/labs/pixellabs/pixel/dngconvert.py", line 19, in <module>
loop.run_until_complete(main())
File "/Users/flynn/anaconda3/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/Users/flynn/Documents/labs/pixellabs/pixel/dngconvert.py", line 8, in main
pydng = DNGConverter(
File "/Users/flynn/anaconda3/lib/python3.10/site-packages/pydngconverter/main.py", line 90, in __init__
raise RuntimeError(
RuntimeError: Cannot use JPEG Preview EXTRACT because wand failed to import!
Warning: imagemagick 7.1.1-9 is already installed and up-to-date.
To reinstall 7.1.1-9, run:
brew reinstall imagemagick