Need help installing RPi.GPIO on a Zero W

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
dstein
Posts: 3
Joined: Mon Oct 04, 2021 12:14 pm

Need help installing RPi.GPIO on a Zero W

Post by dstein »

Help! On a fresh install of DietPi I'm trying to get RPi.GPIO working on a Pi Zero W.

After installing I tried:

Code: Select all

pip3 install RPi.GPIO
That works just fine on Rasbpian, but fails due to some missing packages. I didn't keep the logs, but these 3 packages got me a bit further.

Code: Select all

sudo apt-get install gcc-arm* 
sudo apt-get install build-essential 
sudo apt-get install python3-dev
But now I'm running into C compilation errors.

When I do "pip3 install RPi.GPIO" now here's the errors:

Code: Select all

root@DietPi:~# pip3 install RPi.GPIO
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting RPi.GPIO
  Using cached RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8mqbvfpo
       cwd: /tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/
  Complete output (87 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv6l-3.9
  creating build/lib.linux-armv6l-3.9/RPi
  copying RPi/__init__.py -> build/lib.linux-armv6l-3.9/RPi
  creating build/lib.linux-armv6l-3.9/RPi/GPIO
  copying RPi/GPIO/__init__.py -> build/lib.linux-armv6l-3.9/RPi/GPIO
  running build_ext
  building 'RPi._GPIO' extension
  creating build/temp.linux-armv6l-3.9
  creating build/temp.linux-armv6l-3.9/source
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv6l-3.9/source/c_gpio.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv6l-3.9/source/common.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv6l-3.9/source/constants.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/cpuinfo.c -o build/temp.linux-armv6l-3.9/source/cpuinfo.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv6l-3.9/source/event_gpio.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv6l-3.9/source/py_gpio.o
  source/py_gpio.c: In function ‘PyInit__GPIO’:
  source/py_gpio.c:1046:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
   1046 |    if (!PyEval_ThreadsInitialized())
        |    ^~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:23:
  /usr/include/python3.9/ceval.h:129:36: note: declared here
    129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
        |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
  source/py_gpio.c:1047:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
   1047 |       PyEval_InitThreads();
        |       ^~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:23:
  /usr/include/python3.9/ceval.h:130:37: note: declared here
    130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
        |                                     ^~~~~~~~~~~~~~~~~~
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_pwm.c -o build/temp.linux-armv6l-3.9/source/py_pwm.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/soft_pwm.c -o build/temp.linux-armv6l-3.9/source/soft_pwm.o
  arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv6l-3.9/source/c_gpio.o build/temp.linux-armv6l-3.9/source/common.o build/temp.linux-armv6l-3.9/source/constants.o build/temp.linux-armv6l-3.9/source/cpuinfo.o build/temp.linux-armv6l-3.9/source/event_gpio.o build/temp.linux-armv6l-3.9/source/py_gpio.o build/temp.linux-armv6l-3.9/source/py_pwm.o build/temp.linux-armv6l-3.9/source/soft_pwm.o -o build/lib.linux-armv6l-3.9/RPi/_GPIO.cpython-39-arm-linux-gnueabihf.so
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:42: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:35: multiple definition of `board'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:33: multiple definition of `spi'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:32: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:31: multiple definition of `serial'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:31: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:30: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:29: multiple definition of `output'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:29: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:28: multiple definition of `input'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:28: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:27: multiple definition of `low'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:27: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:26: multiple definition of `high'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:26: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/py_pwm.h:23: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/soft_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-armv6l-3.9/source/event_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/event_gpio.c:60: first defined here
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for RPi.GPIO
  Running setup.py clean for RPi.GPIO
Failed to build RPi.GPIO
Installing collected packages: RPi.GPIO
    Running setup.py install for RPi.GPIO ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/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-fmpn4wca/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPi.GPIO
         cwd: /tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/
    Complete output (87 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv6l-3.9
    creating build/lib.linux-armv6l-3.9/RPi
    copying RPi/__init__.py -> build/lib.linux-armv6l-3.9/RPi
    creating build/lib.linux-armv6l-3.9/RPi/GPIO
    copying RPi/GPIO/__init__.py -> build/lib.linux-armv6l-3.9/RPi/GPIO
    running build_ext
    building 'RPi._GPIO' extension
    creating build/temp.linux-armv6l-3.9
    creating build/temp.linux-armv6l-3.9/source
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv6l-3.9/source/c_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv6l-3.9/source/common.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv6l-3.9/source/constants.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/cpuinfo.c -o build/temp.linux-armv6l-3.9/source/cpuinfo.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv6l-3.9/source/event_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv6l-3.9/source/py_gpio.o
    source/py_gpio.c: In function ‘PyInit__GPIO’:
    source/py_gpio.c:1046:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
     1046 |    if (!PyEval_ThreadsInitialized())
          |    ^~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:129:36: note: declared here
      129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
    source/py_gpio.c:1047:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
     1047 |       PyEval_InitThreads();
          |       ^~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:130:37: note: declared here
      130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_pwm.c -o build/temp.linux-armv6l-3.9/source/py_pwm.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/soft_pwm.c -o build/temp.linux-armv6l-3.9/source/soft_pwm.o
    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv6l-3.9/source/c_gpio.o build/temp.linux-armv6l-3.9/source/common.o build/temp.linux-armv6l-3.9/source/constants.o build/temp.linux-armv6l-3.9/source/cpuinfo.o build/temp.linux-armv6l-3.9/source/event_gpio.o build/temp.linux-armv6l-3.9/source/py_gpio.o build/temp.linux-armv6l-3.9/source/py_pwm.o build/temp.linux-armv6l-3.9/source/soft_pwm.o -o build/lib.linux-armv6l-3.9/RPi/_GPIO.cpython-39-arm-linux-gnueabihf.so
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:42: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:35: multiple definition of `board'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:33: multiple definition of `spi'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:32: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:31: multiple definition of `serial'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:31: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:30: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:29: multiple definition of `output'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:29: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:28: multiple definition of `input'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:28: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:27: multiple definition of `low'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:27: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:26: multiple definition of `high'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/constants.h:26: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/py_pwm.h:23: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/soft_pwm.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-armv6l-3.9/source/event_gpio.o:/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/source/event_gpio.c:60: first defined here
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uly5zetj/rpi-gpio_246fa5ed39594bad953bbba89c94ba85/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-fmpn4wca/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPi.GPIO Check the logs for full command output.
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing RPi.GPIO on a Zero W

Post by Joulinar »

Yes by design DietPi is running without these build packages and they would need to be installed if needed. But to install RPi.GPIO you could use our software catalogue to install software ID 69

Code: Select all

root@DietPiProd:~# dietpi-software list | grep gpio
ID 69 | =0 | Python 3 RPi.GPIO: Control Raspberry Pi GPIO channels in Python 3 | | https://dietpi.com/docs/software/hardware_projects/#rpigpio
root@DietPiProd:~#
Quick install would be

Code: Select all

dietpi-software install 69
This should install all required dependency automatically.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dstein
Posts: 3
Joined: Mon Oct 04, 2021 12:14 pm

Re: Need help installing RPi.GPIO on a Zero W

Post by dstein »

Joulinar wrote: Mon Oct 04, 2021 1:57 pm Yes by design DietPi is running without these build packages and they would need to be installed if needed. But to install RPi.GPIO you could use our software catalogue to install software ID 69

Code: Select all

root@DietPiProd:~# dietpi-software list | grep gpio
ID 69 | =0 | Python 3 RPi.GPIO: Control Raspberry Pi GPIO channels in Python 3 | | https://dietpi.com/docs/software/hardware_projects/#rpigpio
root@DietPiProd:~#
Quick install would be

Code: Select all

dietpi-software install 69
This should install all required dependency automatically.
Thanks but unfortunately this didn't work for me because my next dependency is

Code: Select all

pip3 install adafruit-blinka
That package installs the "board" package. adafruit-blinka depends on RPi.GPIO, but wherever DietPi is installing RPi.GPIO to is not found by the pip3 command:

Code: Select all

root@DietPi:~# python3 -m pip install --force-reinstall adafruit-blinka
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting adafruit-blinka
  Using cached https://www.piwheels.org/simple/adafruit-blinka/Adafruit_Blinka-6.13.1-py3-none-any.whl (184 kB)
Collecting Adafruit-PureIO>=1.1.7
  Using cached https://www.piwheels.org/simple/adafruit-pureio/Adafruit_PureIO-1.1.9-py3-none-any.whl (12 kB)
Collecting sysv-ipc>=1.1.0
  Using cached https://www.piwheels.org/simple/sysv-ipc/sysv_ipc-1.1.0-cp39-cp39-linux_armv6l.whl (63 kB)
Collecting rpi-ws281x>=4.0.0
  Using cached https://www.piwheels.org/simple/rpi-ws281x/rpi_ws281x-4.3.0-cp39-cp39-linux_armv6l.whl (117 kB)
Collecting pyftdi>=0.40.0
  Using cached https://www.piwheels.org/simple/pyftdi/pyftdi-0.53.3-py3-none-any.whl (141 kB)
Collecting Adafruit-PlatformDetect>=3.13.0
  Using cached https://www.piwheels.org/simple/adafruit-platformdetect/Adafruit_PlatformDetect-3.15.3-py3-none-any.whl (18 kB)
Collecting RPi.GPIO
  Using cached RPi.GPIO-0.7.0.tar.gz (30 kB)
Collecting pyserial>=3.0
  Using cached https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting pyusb!=1.2.0,>=1.0.0
  Using cached https://www.piwheels.org/simple/pyusb/pyusb-1.2.1-py3-none-any.whl (58 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/setup.py'"'"'; __file__='"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-t_i2u4v1
       cwd: /tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/
  Complete output (87 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv6l-3.9
  creating build/lib.linux-armv6l-3.9/RPi
  copying RPi/__init__.py -> build/lib.linux-armv6l-3.9/RPi
  creating build/lib.linux-armv6l-3.9/RPi/GPIO
  copying RPi/GPIO/__init__.py -> build/lib.linux-armv6l-3.9/RPi/GPIO
  running build_ext
  building 'RPi._GPIO' extension
  creating build/temp.linux-armv6l-3.9
  creating build/temp.linux-armv6l-3.9/source
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv6l-3.9/source/c_gpio.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv6l-3.9/source/common.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv6l-3.9/source/constants.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/cpuinfo.c -o build/temp.linux-armv6l-3.9/source/cpuinfo.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv6l-3.9/source/event_gpio.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv6l-3.9/source/py_gpio.o
  source/py_gpio.c: In function ‘PyInit__GPIO’:
  source/py_gpio.c:1046:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
   1046 |    if (!PyEval_ThreadsInitialized())
        |    ^~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:23:
  /usr/include/python3.9/ceval.h:129:36: note: declared here
    129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
        |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
  source/py_gpio.c:1047:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
   1047 |       PyEval_InitThreads();
        |       ^~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:23:
  /usr/include/python3.9/ceval.h:130:37: note: declared here
    130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
        |                                     ^~~~~~~~~~~~~~~~~~
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_pwm.c -o build/temp.linux-armv6l-3.9/source/py_pwm.o
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/soft_pwm.c -o build/temp.linux-armv6l-3.9/source/soft_pwm.o
  arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv6l-3.9/source/c_gpio.o build/temp.linux-armv6l-3.9/source/common.o build/temp.linux-armv6l-3.9/source/constants.o build/temp.linux-armv6l-3.9/source/cpuinfo.o build/temp.linux-armv6l-3.9/source/event_gpio.o build/temp.linux-armv6l-3.9/source/py_gpio.o build/temp.linux-armv6l-3.9/source/py_pwm.o build/temp.linux-armv6l-3.9/source/soft_pwm.o -o build/lib.linux-armv6l-3.9/RPi/_GPIO.cpython-39-arm-linux-gnueabihf.so
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:42: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:35: multiple definition of `board'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:33: multiple definition of `spi'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:32: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:31: multiple definition of `serial'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:31: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:30: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:29: multiple definition of `output'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:29: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:28: multiple definition of `input'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:28: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:27: multiple definition of `low'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:27: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:26: multiple definition of `high'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:26: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/py_pwm.h:23: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-armv6l-3.9/source/soft_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-armv6l-3.9/source/event_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/event_gpio.c:60: first defined here
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for RPi.GPIO
  Running setup.py clean for RPi.GPIO
Failed to build RPi.GPIO
Installing collected packages: pyusb, pyserial, sysv-ipc, rpi-ws281x, RPi.GPIO, pyftdi, Adafruit-PureIO, Adafruit-PlatformDetect, adafruit-blinka
  Attempting uninstall: pyusb
    Found existing installation: pyusb 1.2.1
    Uninstalling pyusb-1.2.1:
      Successfully uninstalled pyusb-1.2.1
  Attempting uninstall: pyserial
    Found existing installation: pyserial 3.5
    Uninstalling pyserial-3.5:
      Successfully uninstalled pyserial-3.5
  Attempting uninstall: sysv-ipc
    Found existing installation: sysv-ipc 1.1.0
    Uninstalling sysv-ipc-1.1.0:
      Successfully uninstalled sysv-ipc-1.1.0
  Attempting uninstall: rpi-ws281x
    Found existing installation: rpi-ws281x 4.3.0
    Uninstalling rpi-ws281x-4.3.0:
      Successfully uninstalled rpi-ws281x-4.3.0
  Attempting uninstall: RPi.GPIO
    Found existing installation: RPi.GPIO 0.7.0
    Not uninstalling rpi.gpio at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'RPi.GPIO'. No files were found to uninstall.
    Running setup.py install for RPi.GPIO ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/setup.py'"'"'; __file__='"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/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-1bysknm2/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPi.GPIO
         cwd: /tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/
    Complete output (87 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv6l-3.9
    creating build/lib.linux-armv6l-3.9/RPi
    copying RPi/__init__.py -> build/lib.linux-armv6l-3.9/RPi
    creating build/lib.linux-armv6l-3.9/RPi/GPIO
    copying RPi/GPIO/__init__.py -> build/lib.linux-armv6l-3.9/RPi/GPIO
    running build_ext
    building 'RPi._GPIO' extension
    creating build/temp.linux-armv6l-3.9
    creating build/temp.linux-armv6l-3.9/source
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv6l-3.9/source/c_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv6l-3.9/source/common.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv6l-3.9/source/constants.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/cpuinfo.c -o build/temp.linux-armv6l-3.9/source/cpuinfo.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv6l-3.9/source/event_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv6l-3.9/source/py_gpio.o
    source/py_gpio.c: In function ‘PyInit__GPIO’:
    source/py_gpio.c:1046:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
     1046 |    if (!PyEval_ThreadsInitialized())
          |    ^~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:129:36: note: declared here
      129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
    source/py_gpio.c:1047:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
     1047 |       PyEval_InitThreads();
          |       ^~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:130:37: note: declared here
      130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/py_pwm.c -o build/temp.linux-armv6l-3.9/source/py_pwm.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c source/soft_pwm.c -o build/temp.linux-armv6l-3.9/source/soft_pwm.o
    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv6l-3.9/source/c_gpio.o build/temp.linux-armv6l-3.9/source/common.o build/temp.linux-armv6l-3.9/source/constants.o build/temp.linux-armv6l-3.9/source/cpuinfo.o build/temp.linux-armv6l-3.9/source/event_gpio.o build/temp.linux-armv6l-3.9/source/py_gpio.o build/temp.linux-armv6l-3.9/source/py_pwm.o build/temp.linux-armv6l-3.9/source/soft_pwm.o -o build/lib.linux-armv6l-3.9/RPi/_GPIO.cpython-39-arm-linux-gnueabihf.so
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:42: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:35: multiple definition of `board'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:33: multiple definition of `spi'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:32: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:31: multiple definition of `serial'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:31: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:30: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:29: multiple definition of `output'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:29: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:28: multiple definition of `input'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:28: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:27: multiple definition of `low'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:27: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:26: multiple definition of `high'; build/temp.linux-armv6l-3.9/source/constants.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/constants.h:26: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-armv6l-3.9/source/py_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/py_pwm.h:23: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/py_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv6l-3.9/source/common.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv6l-3.9/source/soft_pwm.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-armv6l-3.9/source/event_gpio.o:/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/source/event_gpio.c:60: first defined here
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
    ----------------------------------------
  ERROR: Can't roll back RPi.GPIO; was not uninstalled
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/setup.py'"'"'; __file__='"'"'/tmp/pip-install-__fy2y8s/rpi-gpio_960816c219b94f7eaedc811a5a31e617/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-1bysknm2/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPi.GPIO Check the logs for full command output.
And unfortunately there are no DietPi packages for adafruit-blinka:

Code: Select all

dietpi-software list | grep adafruit
dietpi-software list | grep blinka
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing RPi.GPIO on a Zero W

Post by Joulinar »

Hi,

I had a look to our source code and we install RPi.GPIO via apt and not via Python pip

Code: Select all

G_AGI python3-rpi.gpio
https://github.com/MichaIng/DietPi/blob ... 5293-L5297
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dstein
Posts: 3
Joined: Mon Oct 04, 2021 12:14 pm

Re: Need help installing RPi.GPIO on a Zero W

Post by dstein »

It seems like apt is not installing that python package in the same way that pip does. This unfortunately is a show stopper for me.
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing RPi.GPIO on a Zero W

Post by Joulinar »

Maybe I found it. https://sourceforge.net/p/raspberry-gpi ... ckets/198/

Seems to be an issue building RPi.GPIO on Python 3.9. RPi.GPIO Version 0.7.0 did not support it until now. https://www.piwheels.org/project/rpi-gpio/#install

could you try following

Code: Select all

pip3 install RPi.GPIO==0.7.1a4
I did a test an a RPi3B+ ARMv6 Bullseye

Code: Select all

dietpi-software install 130 #to install Python
pip3 install RPi.GPIO==0.7.1a4 #to install RPi.GPIO
below the log of the install

Code: Select all

root@DietPi3:~# pip3 install RPi.GPIO==0.7.1a4
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting RPi.GPIO==0.7.1a4
  Downloading https://www.piwheels.org/simple/rpi-gpio/RPi.GPIO-0.7.1a4-cp39-cp39-linux_armv7l.whl (68 kB)
     |████████████████████████████████| 68 kB 438 kB/s
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.1a4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@DietPi3:~#
adafruit-blinka install is working without issue as the Requirement was already satisfied.

Code: Select all

Requirement already satisfied: RPi.GPIO in /usr/local/lib/python3.9/dist-packages (from adafruit-blinka) (0.7.1a4)
Install log below

Code: Select all

root@DietPi3:~# pip3 install adafruit-blinka
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting adafruit-blinka
  Downloading https://www.piwheels.org/simple/adafruit-blinka/Adafruit_Blinka-6.13.1-py3-none-any.whl (184 kB)
     |████████████████████████████████| 184 kB 771 kB/s
Collecting pyftdi>=0.40.0
  Downloading https://www.piwheels.org/simple/pyftdi/pyftdi-0.53.3-py3-none-any.whl (141 kB)
     |████████████████████████████████| 141 kB 942 kB/s
Collecting Adafruit-PlatformDetect>=3.13.0
  Downloading https://www.piwheels.org/simple/adafruit-platformdetect/Adafruit_PlatformDetect-3.15.3-py3-none-any.whl (18 kB)
Requirement already satisfied: RPi.GPIO in /usr/local/lib/python3.9/dist-packages (from adafruit-blinka) (0.7.1a4)
Collecting rpi-ws281x>=4.0.0
  Downloading https://www.piwheels.org/simple/rpi-ws281x/rpi_ws281x-4.3.0-cp39-cp39-linux_armv7l.whl (117 kB)
     |████████████████████████████████| 117 kB 642 kB/s
Collecting sysv-ipc>=1.1.0
  Downloading https://www.piwheels.org/simple/sysv-ipc/sysv_ipc-1.1.0-cp39-cp39-linux_armv7l.whl (63 kB)
     |████████████████████████████████| 63 kB 647 kB/s
Collecting Adafruit-PureIO>=1.1.7
  Downloading https://www.piwheels.org/simple/adafruit-pureio/Adafruit_PureIO-1.1.9-py3-none-any.whl (12 kB)
Collecting pyserial>=3.0
  Downloading https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 979 kB/s
Collecting pyusb!=1.2.0,>=1.0.0
  Downloading https://www.piwheels.org/simple/pyusb/pyusb-1.2.1-py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 1.2 MB/s
Installing collected packages: pyusb, pyserial, sysv-ipc, rpi-ws281x, pyftdi, Adafruit-PureIO, Adafruit-PlatformDetect, adafruit-blinka
Successfully installed Adafruit-PlatformDetect-3.15.3 Adafruit-PureIO-1.1.9 adafruit-blinka-6.13.1 pyftdi-0.53.3 pyserial-3.5 pyusb-1.2.1 rpi-ws281x-4.3.0 sysv-ipc-1.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@DietPi3:~#
There was no need to install anything like gcc-arm* or build-essential as pre-compiled wheels are download from piwheels.org
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: Need help installing RPi.GPIO on a Zero W

Post by MichaIng »

Strange, the python3-rpi.gpio package on Bullseye is pulled from the Debian repository (respectively Raspbian) not the RPi repo, and there clearly is compiled against Python 3.9. In case of Debian at least I trust that it has been tested.

Probably it would be found when uninstalling the pip package and clearing the cache:

Code: Select all

pip3 uninstall RPi.GPIO
rm -R /root/cache/pip
apt install python3-rpi.gpio
pip3 freeze
The last command should then show RPi.GPIO and hence any other module install shouldn't try to install it again.

But if that for whatever reason does not work, great that the new version does, and that it is even available on piwheels so that it doesn't need to be compiled :).
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing RPi.GPIO on a Zero W

Post by Joulinar »

yeah but actually it's a pre-release and not download automatically. Until release, you would need to specify the version.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply