error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6

I have been trying to install ImageMagick in Ubuntu 16.04 to use with movie.py I have installed ImageMagick 7 but when I check the version from the command line convert --version It gives error ...