Gpiozero: python-gpiozero should depend on python-pkg-resources

Created on 8 Jan 2017  路  3Comments  路  Source: gpiozero/gpiozero

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.

bug

Most helpful comment

...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 )

All 3 comments

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 )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bennuttall picture bennuttall  路  6Comments

wallysalami picture wallysalami  路  5Comments

e28eta picture e28eta  路  4Comments

mi-skam picture mi-skam  路  4Comments

tombennet picture tombennet  路  12Comments