Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pillow: libopenjp2.so.7: cannot open shared object file: No such file or directory

I have a fresh, minimal Raspbian Stretch install. I have installed the PIXEL-dekstop by running sudo apt-get install --no-install-recommends xserver-xorg and am now trying to use Pillow in Python. Pillow was installed by running sudo apt-get install pip3 and then sudo pip3 install Pillow. Whenever I try from PIL import Image I get the error ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory.

I have attempted to reinstall Pillow under different versions but it does not help. I have also enabled apt-get sources in /etc/apt/sources.txt and ran sudo apt-get build-dep python-imaging, which also did not help. Any help is appreciated.

Python version: 3.5.3, current Pillow version: 4.3.0

like image 324
Simon Carlson Avatar asked Dec 28 '17 18:12

Simon Carlson


1 Answers

What worked for me was running :

sudo apt-get install libopenjp2-7

Good Luck!

like image 122
Paulo Cirino Avatar answered Oct 16 '22 16:10

Paulo Cirino