Importing Button from gpiozero fails if python-pkg-resources is not installed:
from gpiozero import Button
File "/usr/lib/python2.7/dist-packages/gpiozero/__init__.py", line 58, in <module>
from .devices import (
File "/usr/lib/python2.7/dist-packages/gpiozero/devices.py", line 18, in <module>
import pkg_resources
ImportError: No module named pkg_resources
So I guess a dependency should probably be added.
I'm getting this as well on python and python3
You need to install python-dev and/or python3-dev:
sudo apt install python-dev python3-dev
...or you can just install python-pkg-resources and/or python3-pkg-resources :
sudo apt-get install python-pkg-resources python3-pkg-resources
(see https://github.com/RPi-Distro/python-gpiozero/issues/538#issuecomment-283366919 )
Most helpful comment
...or you can just install python-pkg-resources and/or python3-pkg-resources :
(see https://github.com/RPi-Distro/python-gpiozero/issues/538#issuecomment-283366919 )