Hi guys i suriously tired to solve this problem i have a raspberry pi 3 model B i'm running the raspberry using putty and raspbian using vnc viewr i open the terminal window to creat a simple project "blink LED" using python when i put ***

$import RPI.GPIO as GPIO

*** the terminal show me this error enter image description here

so i try to import the GPIO package in putty by putting this code

$ sudo apt-get install python python-dev python-pip

so he working but finally he show me this error enter image description here

i think this problem because there is no network in raspberry pi, i have a network in my pc but i can't access with this network to my raspberry pi if there is a way to import those file offline and thaks a lot

  • Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here - especially how questions, answers, comments are supposed to be used. Thanks. – Ghanima Jun 24 '17 at 6:38

Capitalization matters. Try this:

import RPi.GPIO as GPIO

Note: the lowercase i in RPi

You also don't need to run Python with sudo as in your first screenshot. just python will work.

As for using apt, you will definitely need a network connection to install or update packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.