Question Traceback (most recent call last): File "app.py", line 2, in <module> import RPi.GPIO as GPIO ModuleNotFoundError: No module named 'RPi' make: *

Nov 5, 2021
15
0
10
Last edited by a moderator:

kanewolf

Titan
Moderator
Hello!

I am following this how-to: https://www.tomshardware.com/how-to/turn-a-rotary-phone-into-google-assistant-with-raspberry-pi

I am currently on the second to last step. I run the "make run" command. I received the following error

Traceback (most recent call last): File "app.py", line 2, in <module> import RPi.GPIO as GPIO ModuleNotFoundError: No module named 'RPi' make: *

I have tryed many things, and any help would be greatly appreciated! Have a good day!
What this looks like to me is that you don't have all the required Python libraries installed correctly. It is looking for the GPIO library and not finding it.
 
Nov 5, 2021
15
0
10
UPDATE

just tryed to instal got thiss error:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
 
Nov 5, 2021
15
0
10
I just tried to install it a different way, and it says this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.16-1).
The following package was automatically installed and is no longer required:
python-colorzero
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Do you have the Python dev package installed?


So to ansewer your question: Yes!
 

kanewolf

Titan
Moderator
I just tried to install it a different way, and it says this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.16-1).
The following package was automatically installed and is no longer required:
python-colorzero
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
So to ansewer your question: Yes!
This is the support page for that library -- https://pypi.org/project/RPi.GPIO/ is it installed ?
 

kanewolf

Titan
Moderator

TRENDING THREADS