pimoroni / breakout-garden

Documentation, software, and examples for the Breakout Garden ecosystem.
https://shop.pimoroni.com/products/breakout-garden-hat
MIT License
72 stars 14 forks source link

Seismometer example: ImportError: No module named PIL #13

Closed raspberryrippl3 closed 4 years ago

raspberryrippl3 commented 5 years ago

I had problems with PIL and the seismometer example, solved by installing python-imaging and libopenjp2-7-dev


$ python seismograph.py 
Traceback (most recent call last):
  File "seismograph.py", line 6, in <module>
    from PIL import Image
ImportError: No module named PIL

$ sudo apt-get install python-imaging

$ python seismograph.py 
Traceback (most recent call last):
  File "seismograph.py", line 11, in <module>
    from luma.core.interface.serial import i2c
ImportError: No module named luma.core.interface.serial

$ python3 seismograph.py 
Traceback (most recent call last):
  File "seismograph.py", line 6, in <module>
    from PIL import Image
  File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 94, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

$ sudo apt-get install libopenjp2-7-dev

$ python3 seismograph.py
Gadgetoid commented 5 years ago

I'll add an import-trap for this. I think "Lite" versions of Raspbian aren't shipping with PIL (which is required on full for python-sense-hat)

Gadgetoid commented 4 years ago

I believe this was fixed in https://github.com/pimoroni/breakout-garden/commit/2b8314d080d10554f40e8c76e2596076b9f9429f