BrachioGraph icon indicating copy to clipboard operation
BrachioGraph copied to clipboard

ModuleNotFoundError: No module named 'PIL'

Open optimismus opened this issue 6 years ago • 2 comments

This doesn't work:

pi@raspiB:~/BrachioGraph $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from linedraw import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/BrachioGraph/linedraw.py", line 10, in <module>
    from PIL import Image, ImageDraw, ImageOps
ModuleNotFoundError: No module named 'PIL'

source: https://brachiograph.readthedocs.io/en/latest/how-to/use-linedraw.html

As adviced I installed: pip3 install opencv-python-headless before.

But "PIL" = the libary pillow is missing, it has a lot of depencies you have to install before, that means, this has to be done additionally:

sudo apt-get install libjpeg-dev -y
sudo apt-get install zlib1g-dev -y
sudo apt-get install libfreetype6-dev -y
sudo apt-get install liblcms1-dev -y
sudo apt-get install libopenjp2-7 -y
sudo apt-get install libtiff5 -y
sudo pip3 install pillow

Regards Axel

optimismus avatar Nov 30 '19 17:11 optimismus

same issue when trying to run the Reachy Unity simulation + python webserver API, any solution ?

alex8411 avatar Oct 08 '20 09:10 alex8411

Support for PIL was discontinued in 2011. The project is now being maintained as Pillow.

pip install Pillow

LumaC0 avatar Mar 27 '21 21:03 LumaC0