Error: "ModuleNotFoundError: No module named 'RPi'"

Discussion in 'General Questions' started by jacka13, Apr 3, 2022.

  1. jacka13

    jacka13 Bit poster

    Messages:
    2
    Hello!
    This is my first post in the forums so I apologize in advance for anything that I have done wrong! I am following this guide: I am currently at the second to last step: "Run the make command."

    I got this error:

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

    Any help would be greatly appreciated! Have a good day!
     
  2. jacka13

    jacka13 Bit poster

    Messages:
    2
    no response.
     
  3. GampaA@P

    GampaA@P Pro

    Messages:
    442
    Hello, Sorry for the delay in response please follow the below-mentioned steps to fix the ModuleNotFoundError.

    1. Find the python installation location using the command where python is in the command prompt.
    2. Navigate to the Scripts folder under the python installation folder.
    3. Use the below command.
     

Share This Page