1
votes

Built Python 3.7 on my Raspberry pi zero in a attempt to upgrade from Python 3.5.3 The build was successful, ran into the module not found for smbus and switched that to smbus2, now when I import gpiozero I get Module not found. my DungeonCube.py program was working fine under Python 3.5.3, but now Python 3.7 seems to have trouble finding gpiozero

this is what I did to test:

python3
Python 3.7.0 (default, Sept 7 2018, 14:22:04)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gpiozero
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gpiozero'
>>>

anyone know how to get python 3.7 to see gpiozero module?

2
u may be using python2 - Alberto S.

2 Answers

0
votes

I had same problem, realized that i used pip3 to install the package, but I was trying to use it with python which invokes python2. I tried with python3 it works just fine.

0
votes

did you download the gpiozero module onto the raspberry pi? it does not come preinstalled with python.

you could try to do "sudo python3 pip install gpiozero". if that doesnt work replace python3 with python @GarryOsborne .