I am trying to install RPi.GPIO for my Raspberry Pi 3 target build. I have installed Visual Studio 19 as described to enable py_gpio.o to be compiled. But it fails by saying it can’t find gcc. Do you know how to ensure it knows how to get to the gcc compiler in Visual Studio? Thank you
[main] Installing collected packages: AWSIoTPythonSDK, wheel, colorzero, gpiozero, RPi.GPIO
[main] Running setup.py install for AWSIoTPythonSDK: started
[main] Running setup.py install for AWSIoTPythonSDK: finished with status ‘done’
[main] Running setup.py install for RPi.GPIO: started
[main] Running setup.py install for RPi.GPIO: finished with status ‘error’
[main] ERROR: Command errored out with exit status 1:
[main] command: /usr/local/bin/python3.5 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-lb88wlg6/RPi.GPIO/setup.py’"’"’; file=’"’"’/tmp/pip-install-lb88wlg6/RPi.GPIO/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-sl0rtqzb/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5m/RPi.GPIO
[main] cwd: /tmp/pip-install-lb88wlg6/RPi.GPIO/
[main] Complete output (16 lines):
[main] running install
[main] running build
[main] running build_py
[main] creating build
[main] creating build/lib.linux-armv7l-3.5
[main] creating build/lib.linux-armv7l-3.5/RPi
[main] copying RPi/init.py -> build/lib.linux-armv7l-3.5/RPi
[main] creating build/lib.linux-armv7l-3.5/RPi/GPIO
[main] copying RPi/GPIO/init.py -> build/lib.linux-armv7l-3.5/RPi/GPIO
[main] running build_ext
[main] building ‘RPi._GPIO’ extension
[main] creating build/temp.linux-armv7l-3.5
[main] creating build/temp.linux-armv7l-3.5/source
[main] gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.5m -c source/py_gpio.c -o build/temp.linux-armv7l-3.5/source/py_gpio.o
[main] unable to execute ‘gcc’: No such file or directory
[main] error: command ‘gcc’ failed with exit status 1
[main] ----------------------------------------
[main]
[main] ERROR: Command errored out with exit status 1: /usr/local/bin/python3.5 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-lb88wlg6/RPi.GPIO/setup.py’"’"’; file=’"’"’/tmp/pip-install-lb88wlg6/RPi.GPIO/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-sl0rtqzb/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5m/RPi.GPIO Check the logs for full command output.
[main]
[main] WARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.
[main] You should consider upgrading via the ‘/usr/local/bin/python3.5 -m pip install --upgrade pip’ command.
[main]
[main] Removing intermediate container 5155146d168c
[main] The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 1
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: main
[Error] Error: The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 1
[Info] Built on arm03
[Error] Not deploying release.
Remote build failed