2

I am trying this out for the first time with not much success I recently bought latest Raspberry PI 3 B+

I am trying to install RPi.GPIO via python 3.7 on my windows 10 machine.

I have successfully downloaded RPi.GPIO-0.6.3

when I run the install in the command window with 'pip install RPi.GPIO' its starts, and looks like it has been successful, but the process has errors! the first one being 'Failed building wheel for RPi.GPIO' It then indicates an error running 'setup.py install for RPi.GPIO'

Lastly it then says that Microsoft Visual C++ 14.0 is required .

Any ideas of what has gone wrong and how can i fix this?

asked Mar 26, 2018 at 9:15
6
  • What are you trying to do? What is your end goal? Commented Mar 26, 2018 at 9:23
  • I am wanting to learn Python, and be able to control the GPIO pins on the Raspberry PI, just to do basic things at first like turning LED's on and off, but I havent got the environment setup correctly as I get numerous errors, (when I try to import the module in IDLE I get:- 'import PRi.GPIO as GPIO ModuleNotFoundError: No module named 'PRi' i thought RPi.GPIO' was for python but I am mistaken- and I somehow need to run that on the Raspberry PI instead..? im still trying to figure out how to do that Commented Mar 26, 2018 at 10:13
  • Was that a typo? You need to be on the Pi and the command is import RPi.GPIO as GPIO. Note that letter case is important and needs to be correct. Commented Mar 26, 2018 at 10:29
  • yes sorry was Typo, I did mean 'import RPi.GPIO...thanks again for all your usefull feedback! Commented Mar 26, 2018 at 11:04
  • 1
    What do you expect to achieve by installing an RPi library on Windows 10? Commented Mar 26, 2018 at 12:02

1 Answer 1

2

The RPi.GPIO Python module only works on a Raspberry Pi. It accesses the Raspberry Pi's GPIO and expects to be running under a Linux environment.

answered Mar 26, 2018 at 9:23
4
  • Thanks for your quick response, i can confrim that I do have a Raspberyy PI. so am I actually doing something wrong, is the problem that I am running this in the cmd window of my windows machine? should I be running this somewhere else, i.e. some environment on my Raspberry PI? if so where is it & what is it called? sorry I am completely new to this Commented Mar 26, 2018 at 9:39
  • Yes. To work the RPi.GPIO module requires 1) to be running on a Raspberry Pi, 2) to be running under the Linux operating system. Commented Mar 26, 2018 at 9:41
  • 1
    You could use putty (I think that is the name) to access a command window running on the Pi from your Windows PC. That may be what you want to do. Commented Mar 26, 2018 at 9:44
  • Also see raspberrypi.org/documentation/remote-access Commented Mar 26, 2018 at 9:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.