raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 5:03 pm

Hi, I ran the "pip3 install RPI.GPIO" command but I got a long list of errors in red. In the middle some messages in white are:

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

long list of messages in red again. Anybody knows how to fix this?

User avatar
croston
Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 5:29 pm

What version of gcc is it using? I'm in the process of fixing failing builds with gcc 10.

raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 5:32 pm

croston wrote:
Fri Oct 23, 2020 5:29 pm
What version of gcc is it using? I'm in the process of fixing failing builds with gcc 10.
gcc -v

gave

gcc version 10.2.0 (Ubuntu 19.2.0-13ubuntu1)



going to python3 and then

from RPI import GPIO

gave ModuleNotFoundError: No module named "RPI"

User avatar
croston
Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 6:01 pm

Try this as a workaround:

Code: Select all

export CFLAGS=-fcommon
pip3 install RPi.GPIO
(I haven't tested this)

raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 6:07 pm

croston wrote:
Fri Oct 23, 2020 6:01 pm
Try this as a workaround:

Code: Select all

export CFLAGS=-fcommon
pip3 install RPi.GPIO
(I haven't tested this)
Thank you. It says:

Requirement already satisfied: RPI.GPIO in /usr/lib/python3/dist-packages (0.7.0)

Tried "from RPI import GPIO" inside python3 again but same "No module named 'RPI'" error.

User avatar
croston
Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 6:17 pm

'RPi' should have a small 'i'

raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 6:39 pm

croston wrote:
Fri Oct 23, 2020 6:17 pm
'RPi' should have a small 'i'
Thank you. Now typing "from RPi import GPIO" under python3 does not give an error.

I went to the adafruit site to install Python libraries and did a test.

https://learn.adafruit.com/circuitpytho ... spberry-pi

I got a "Not running on a RPi" error even I am running it on a Pi?! Do you know what is wrong?

Hello blinka!
Traceback (most recent call last):
File "blinkatest.py", line 7, in <module>
pin = digitalio.DigitalInOut(board.D4)
File "/home/pi/.local/lib/python3.8/site-packages/digitalio.py", line 111, in __init__
self.direction = Direction.INPUT
File "/home/pi/.local/lib/python3.8/site-packages/digitalio.py", line 141, in direction
self._pin.init(mode=Pin.IN)
File "/home/pi/.local/lib/python3.8/site-packages/adafruit_blinka/microcontroller/bcm283x/pin.py", line 37, in init
GPIO.setup(self.id, GPIO.IN)
RuntimeError: Not running on a RPi!

MinePro120
Posts: 2
Joined: Fri Oct 23, 2020 7:24 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Fri Oct 23, 2020 7:31 pm

About the "Not running on a RPi", you should run the script as root or add your user to the same groups as user "ubuntu".

User avatar
kerry_s
Posts: 3930
Joined: Thu Jan 30, 2020 7:14 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Sat Oct 24, 2020 7:02 am

there expecting raspberry os(aka: raspbian), it's in the prerequisite.
https://www.raspberrypi.org/downloads/raspberry-pi-os/

ubuntu is a different beast, it's not raspberry os. if your going to use software made for raspberry os, you should be running raspberry.

there's a difference between software & device, just because your using the right device doesn't mean the software will work on any os.

User avatar
croston
Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Sat Oct 24, 2020 10:01 am

I've discovered a possible solution from someone running Ubuntu 20.04. Ubuntu doesn't have permissions set correctly for GPIO and RPi.GPIO gives a misleading error message about not running on a RPi. I haven't tested this myself.

Create /etc/udev/rules.d/90-gpio.rules with:

Code: Select all

KERNEL=="gpiomem", OWNER="root", GROUP="gpio"
Create the group itself and assign it to an existing user "pi":

Code: Select all

sudo groupadd -f --system gpio
sudo usermod -a -G gpio pi
Reboot for these changes to take effect. The last command assumes your username is 'pi'. If this is different, then just substitute it in the command above.

raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Sun Oct 25, 2020 2:28 am

croston wrote:
Sat Oct 24, 2020 10:01 am
I've discovered a possible solution from someone running Ubuntu 20.04. Ubuntu doesn't have permissions set correctly for GPIO and RPi.GPIO gives a misleading error message about not running on a RPi. I haven't tested this myself.

Create /etc/udev/rules.d/90-gpio.rules with:

Code: Select all

KERNEL=="gpiomem", OWNER="root", GROUP="gpio"
Create the group itself and assign it to an existing user "pi":

Code: Select all

sudo groupadd -f --system gpio
sudo usermod -a -G gpio pi
Reboot for these changes to take effect. The last command assumes your username is 'pi'. If this is different, then just substitute it in the command above.
Thank you but still does not work.

User avatar
croston
Posts: 723
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Sun Oct 25, 2020 12:34 pm

Does it work when you run your script using sudo? If so, this points to problems with permissions, or the lack of /dev/gpiomem.

raspberry_user
Posts: 217
Joined: Fri Jan 02, 2015 11:34 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Sun Oct 25, 2020 12:53 pm

croston wrote:
Sun Oct 25, 2020 12:34 pm
Does it work when you run your script using sudo? If so, this points to problems with permissions, or the lack of /dev/gpiomem.
I just copied and pasted your commands which had sudo included.

dave666
Posts: 1
Joined: Sat Feb 27, 2021 1:02 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Mon Mar 01, 2021 5:25 pm

raspberry_user wrote:
Fri Oct 23, 2020 6:07 pm
croston wrote:
Fri Oct 23, 2020 6:01 pm
Try this as a workaround:

Code: Select all

export CFLAGS=-fcommon
pip3 install RPi.GPIO
(I haven't tested this)
Thank you. It says:

Requirement already satisfied: RPI.GPIO in /usr/lib/python3/dist-packages (0.7.0)

Tried "from RPI import GPIO" inside python3 again but same "No module named 'RPI'" error.
To solve the same problem on Ubuntu 20.10 (Desktop) 64-bit, I used:

Code: Select all

export CFLAGS=-fcommon
pip3 install RPi.GPIO
and it worked perfectly. Thanks!!!

Nested
Posts: 1
Joined: Thu May 20, 2021 7:32 am

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Thu May 20, 2021 7:57 am

If I run my script without sudo:

Code: Select all

python3 my_script.py
I have this error:

Code: Select all

RuntimeError: Not running on a RPi!
If I use:

Code: Select all

sudo python3 my_script.py
It's work correct.

I add my User to root:

Code: Select all

groups ubuntu 
ubuntu : ubuntu root adm tty dialout cdrom floppy sudo audio dip video plugdev netdev lxd
Reboot, Run and have error again:

Code: Select all

python3 my_script.py
RuntimeError: Not running on a RPi!
Maybe I needd to add my user to another group?

drtechno
Posts: 261
Joined: Fri Apr 09, 2021 6:33 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Wed Jun 02, 2021 10:18 pm

I know from wiring pi I had to make the user pi. I should find and copy over the groups as well. But these error I see on mine (user pi on ubuntu)

Code: Select all

 ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/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-66d1ivi0
       cwd: /tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/
  Complete output (102 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-aarch64-3.9
  creating build/lib.linux-aarch64-3.9/RPi
  copying RPi/__init__.py -> build/lib.linux-aarch64-3.9/RPi
  creating build/lib.linux-aarch64-3.9/RPi/GPIO
  copying RPi/GPIO/__init__.py -> build/lib.linux-aarch64-3.9/RPi/GPIO
  running build_ext
  building 'RPi._GPIO' extension
  creating build/temp.linux-aarch64-3.9
  creating build/temp.linux-aarch64-3.9/source
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/c_gpio.o
  source/c_gpio.c: In function ‘setup’:
  source/c_gpio.c:130:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    130 |     if ((uint32_t)gpio_mem % PAGE_SIZE)
        |         ^
  source/c_gpio.c:131:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    131 |         gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
        |                                  ^
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/common.o
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/constants.o
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/cpuinfo.o
  source/cpuinfo.c: In function ‘get_rpi_info’:
  source/cpuinfo.c:139:28: warning: format ‘%llx’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘uint64_t *’ {aka ‘long unsigned int *’} [-Wformat=]
    139 |       sscanf(revision, "%llx", &rev);
        |                         ~~~^   ~~~~
        |                            |   |
        |                            |   uint64_t * {aka long unsigned int *}
        |                            long long unsigned int *
        |                         %lx
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/event_gpio.o
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-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);
        |                                     ^~~~~~~~~~~~~~~~~~
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/py_pwm.o
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/soft_pwm.o
  aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.9/source/c_gpio.o build/temp.linux-aarch64-3.9/source/common.o build/temp.linux-aarch64-3.9/source/constants.o build/temp.linux-aarch64-3.9/source/cpuinfo.o build/temp.linux-aarch64-3.9/source/event_gpio.o build/temp.linux-aarch64-3.9/source/py_gpio.o build/temp.linux-aarch64-3.9/source/py_pwm.o build/temp.linux-aarch64-3.9/source/soft_pwm.o -o build/lib.linux-aarch64-3.9/RPi/_GPIO.cpython-39-aarch64-linux-gnu.so
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:42: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:41: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:40: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:39: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:38: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:37: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:36: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:35: multiple definition of `board'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:35: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:34: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:33: multiple definition of `spi'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:33: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:32: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:31: multiple definition of `serial'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:31: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:30: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:29: multiple definition of `output'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:29: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:28: multiple definition of `input'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:28: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:27: multiple definition of `low'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:27: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:26: multiple definition of `high'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:26: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/py_pwm.h:23: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
  /usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/event_gpio.c:60: first defined here
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/aarch64-linux-gnu-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-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/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-9aqowm9v/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPI.GPIO
         cwd: /tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/
    Complete output (102 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.9
    creating build/lib.linux-aarch64-3.9/RPi
    copying RPi/__init__.py -> build/lib.linux-aarch64-3.9/RPi
    creating build/lib.linux-aarch64-3.9/RPi/GPIO
    copying RPi/GPIO/__init__.py -> build/lib.linux-aarch64-3.9/RPi/GPIO
    running build_ext
    building 'RPi._GPIO' extension
    creating build/temp.linux-aarch64-3.9
    creating build/temp.linux-aarch64-3.9/source
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/c_gpio.o
    source/c_gpio.c: In function ‘setup’:
    source/c_gpio.c:130:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      130 |     if ((uint32_t)gpio_mem % PAGE_SIZE)
          |         ^
    source/c_gpio.c:131:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      131 |         gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
          |                                  ^
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/common.o
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/constants.o
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/cpuinfo.o
    source/cpuinfo.c: In function ‘get_rpi_info’:
    source/cpuinfo.c:139:28: warning: format ‘%llx’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘uint64_t *’ {aka ‘long unsigned int *’} [-Wformat=]
      139 |       sscanf(revision, "%llx", &rev);
          |                         ~~~^   ~~~~
          |                            |   |
          |                            |   uint64_t * {aka long unsigned int *}
          |                            long long unsigned int *
          |                         %lx
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/event_gpio.o
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-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);
          |                                     ^~~~~~~~~~~~~~~~~~
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/py_pwm.o
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -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-aarch64-3.9/source/soft_pwm.o
    aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-xSUlVY/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.9/source/c_gpio.o build/temp.linux-aarch64-3.9/source/common.o build/temp.linux-aarch64-3.9/source/constants.o build/temp.linux-aarch64-3.9/source/cpuinfo.o build/temp.linux-aarch64-3.9/source/event_gpio.o build/temp.linux-aarch64-3.9/source/py_gpio.o build/temp.linux-aarch64-3.9/source/py_pwm.o build/temp.linux-aarch64-3.9/source/soft_pwm.o -o build/lib.linux-aarch64-3.9/RPi/_GPIO.cpython-39-aarch64-linux-gnu.so
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:42: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:41: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:40: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:39: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:38: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:37: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:36: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:35: multiple definition of `board'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:35: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:34: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:33: multiple definition of `spi'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:33: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:32: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:31: multiple definition of `serial'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:31: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:30: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:29: multiple definition of `output'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:29: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:28: multiple definition of `input'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:28: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:27: multiple definition of `low'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:27: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:26: multiple definition of `high'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/constants.h:26: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/py_pwm.h:23: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/source/event_gpio.c:60: first defined here
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/aarch64-linux-gnu-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-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2lg6_nh9/rpi-gpio_d94152161d1c4a448f14a1b24e1b28c2/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-9aqowm9v/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/RPI.GPIO Check the logs for full command output.
Looks like the python version is too new because of the depreciated errors.BTW it won't be the first time the Ubuntu users had to pry programs out of proprietary OS installs. There is always a way.

drtechno
Posts: 261
Joined: Fri Apr 09, 2021 6:33 pm

Re: Installation of RPI.GPIO failure on Pi4 running Ubuntu 20.10 Desktop

Thu Jun 03, 2021 4:02 am

so do this:

Code: Select all

sudo -i
dpkg --add-architecture armhf
apt-get update
apt-get install python-dev python3-dev
apt-get install mercurial
 pip install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
 pip3 install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
 

Return to “Ubuntu”