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?
1 Answer 1
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.
-
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 thistashmobird– tashmobird2018年03月26日 09:39:16 +00:00Commented 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.joan– joan2018年03月26日 09:41:35 +00:00Commented Mar 26, 2018 at 9:41
-
1You 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.joan– joan2018年03月26日 09:44:18 +00:00Commented Mar 26, 2018 at 9:44
-
Also see raspberrypi.org/documentation/remote-accessjoan– joan2018年03月26日 09:45:44 +00:00Commented Mar 26, 2018 at 9:45
import RPi.GPIO as GPIO
. Note that letter case is important and needs to be correct.