I tried troubleshooting your output and got these results: > from ctypes import * Close all the image windows that the Python code opened by clicking on the X before exiting from the Python interpreter. This code should run successfully and open the image in a separate window and show the console output. If you are running this code from the terminal, press Enter twice after the end of the code to run the code.
![python imagemagick python imagemagick](https://i.stack.imgur.com/ODrdH.png)
I.save(filename='mona-lisa-.png'.format(r)) With Image(filename='mona-lisa.png') as img:
#PYTHON IMAGEMAGICK INSTALL#
sudo apt install python-wand libmagickwand-devĬreate an image called mona-lisa.png in your own home directory to use in the following example code from the wand documentation. Install wand in Ubuntu 16.04 from the default Ubuntu repositories. (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/Īlso running ctypes shows the library: > from ctypes.util import find_libraryĬonfirm that it's not v7: $ convert -version You probably had not installed ImageMagick library. ImportError: MagickWand shared library not found. OSError: cannot find library tried paths: ĭuring handling of the above exception, another exception occurred: Raise IOError('cannot find library tried paths: ' + repr(tried_paths))
![python imagemagick python imagemagick](https://www.pythonpool.com/wp-content/uploads/2021/06/image-13.png)
Followed installation instructions by running: sudo apt install libmagickwand-dev imagemagickīut I get the following error when trying to import Image: > from wand.image import Image OSError: /home/myuname/anaconda3/bin/./lib/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/x86_64-linux-gnu/.2) Perhaps this is the cause? > from ctypes import *