OpenAgricultureFoundation / openag_brain_docker_rpi

Docker-compose configuration for openag_brain
GNU General Public License v3.0
19 stars 12 forks source link

Exception with image_persistance #10

Closed yaromins closed 8 years ago

yaromins commented 8 years ago

I'm not sure if current docker_rpi is stable enough to report issues. So sorry if it's too early.

Traceback (most recent call last): File "/home/pi/catkin_ws/src/openag_brain/src/openag_brain/software_modules/image_persistence.py", line 15, in from PIL import Image ImportError: No module named PIL

gordonbrander commented 8 years ago

This is a known bug, and an easy fix. We just need to add the Python package PIL to the Docker image for openag_brain.

A quick fix is to shell into the docker image and pip install pil.

yaromins commented 8 years ago

pi@0e2b11c7059d:~$ pip install pil
Collecting pil Could not find a version that satisfies the requirement pil (from versions: ) No matching distribution found for pil

I guess some more magic needed?

gordonbrander commented 8 years ago

@serein7 my mistake. PIL is no longer maintained. You want pip install Pillow (a maintained fork of pil).

yaromins commented 8 years ago

@gordonbrander Pillow's build is failing with ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting This thread is saying that

sudo apt-get install libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev libtiff5-dev tcl8.5-dev tk8.5-dev python-tk

should solve the issue. But this takes 105Mb to install. Not sure if all of those needed for openag use cases.

gordonbrander commented 8 years ago

Taking a look at this.

gordonbrander commented 8 years ago

@LeonChambers it looks like Pillow relies on a few external binaries (jpeg, zlib). These can be disabled, but then Pillow doesn't support them. Do you know what we use? Just jpg I'm guessing.

gordonbrander commented 8 years ago

Moving issue to https://github.com/OpenAgInitiative/openag_brain/issues/35.