adafruit / adafruit-beaglebone-io-python

Adafruit's BeagleBone IO Python Library
http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black
477 stars 217 forks source link

Errors during installing Adafruit_BBIO with Pip #351

Closed buu-huu closed 3 years ago

buu-huu commented 3 years ago

I am experiencing a problem importing the UART part of the Adafruit_BBIO module:

import Adafruit_BBIO.UART
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Adafruit_BBIO.UART'

Importing the library with import Adafruit_BBIO does not result in an error. But anyways, I am not able to access UART via Adafruit_BBIO.UART then.

Edit

The error occurs for every module like SPI, GPIO, PWM, etc. Always the same error message ("module not found"). It seems, that there was a problem installing the module via pip. I installed the module manually by cloning the repository and running setup.py. When I try to install it with sudo pip3 install Adafruit_BBIO it gives me that bunch of errors:

$ sudo pip3 install Adafruit_BBIO
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting Adafruit_BBIO
  Using cached Adafruit_BBIO-1.2.0.tar.gz (78 kB)
Building wheels for collected packages: Adafruit-BBIO
  Building wheel for Adafruit-BBIO (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-19u52ixe
       cwd: /tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/
  Complete output (54 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.9
  copying Adafruit_I2C.py -> build/lib.linux-armv7l-3.9
  creating build/lib.linux-armv7l-3.9/overlays
  copying overlays/builder.py -> build/lib.linux-armv7l-3.9/overlays
  copying overlays/__init__.py -> build/lib.linux-armv7l-3.9/overlays
  creating build/lib.linux-armv7l-3.9/Adafruit_BBIO
  copying Adafruit_BBIO/sysfs.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
  copying Adafruit_BBIO/Encoder.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
  copying Adafruit_BBIO/__init__.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
  running build_ext
  building 'Adafruit_BBIO.GPIO' extension
  creating build/temp.linux-armv7l-3.9
  creating build/temp.linux-armv7l-3.9/source
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/c_pinmux.c -o build/temp.linux-armv7l-3.9/source/c_pinmux.o -Wall
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv7l-3.9/source/common.o -Wall
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv7l-3.9/source/constants.o -Wall
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv7l-3.9/source/event_gpio.o -Wall
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv7l-3.9/source/py_gpio.o -Wall
  source/py_gpio.c: In function ‘PyInit_GPIO’:
  source/py_gpio.c:602:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
    602 |    if (!PyEval_ThreadsInitialized())
        |    ^~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:31:
  /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:603:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
    603 |       PyEval_InitThreads();
        |       ^~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.9/Python.h:145,
                   from source/py_gpio.c:31:
  /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 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.9/source/c_pinmux.o build/temp.linux-armv7l-3.9/source/common.o build/temp.linux-armv7l-3.9/source/constants.o build/temp.linux-armv7l-3.9/source/event_gpio.o build/temp.linux-armv7l-3.9/source/py_gpio.o -o build/lib.linux-armv7l-3.9/Adafruit_BBIO/GPIO.cpython-39-arm-linux-gnueabihf.so
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:15: multiple definition of `version'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:15: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:14: multiple definition of `both_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:14: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:13: multiple definition of `falling_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:13: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:12: multiple definition of `rising_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:12: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:11: multiple definition of `pud_down'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:11: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:10: multiple definition of `pud_up'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:10: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:9: multiple definition of `pud_off'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:9: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:8: multiple definition of `alt0'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:8: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:7: multiple definition of `output'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:7: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:6: multiple definition of `input'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:6: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:5: multiple definition of `low'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:5: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:4: multiple definition of `high'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:4: 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 Adafruit-BBIO
  Running setup.py clean for Adafruit-BBIO
Failed to build Adafruit-BBIO
Installing collected packages: Adafruit-BBIO
    Running setup.py install for Adafruit-BBIO ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-m6chmhf8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/Adafruit-BBIO
         cwd: /tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/
    Complete output (54 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.9
    copying Adafruit_I2C.py -> build/lib.linux-armv7l-3.9
    creating build/lib.linux-armv7l-3.9/overlays
    copying overlays/builder.py -> build/lib.linux-armv7l-3.9/overlays
    copying overlays/__init__.py -> build/lib.linux-armv7l-3.9/overlays
    creating build/lib.linux-armv7l-3.9/Adafruit_BBIO
    copying Adafruit_BBIO/sysfs.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
    copying Adafruit_BBIO/Encoder.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
    copying Adafruit_BBIO/__init__.py -> build/lib.linux-armv7l-3.9/Adafruit_BBIO
    running build_ext
    building 'Adafruit_BBIO.GPIO' extension
    creating build/temp.linux-armv7l-3.9
    creating build/temp.linux-armv7l-3.9/source
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/c_pinmux.c -o build/temp.linux-armv7l-3.9/source/c_pinmux.o -Wall
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv7l-3.9/source/common.o -Wall
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv7l-3.9/source/constants.o -Wall
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv7l-3.9/source/event_gpio.o -Wall
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv7l-3.9/source/py_gpio.o -Wall
    source/py_gpio.c: In function ‘PyInit_GPIO’:
    source/py_gpio.c:602:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
      602 |    if (!PyEval_ThreadsInitialized())
          |    ^~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:31:
    /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:603:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
      603 |       PyEval_InitThreads();
          |       ^~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:31:
    /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 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.9/source/c_pinmux.o build/temp.linux-armv7l-3.9/source/common.o build/temp.linux-armv7l-3.9/source/constants.o build/temp.linux-armv7l-3.9/source/event_gpio.o build/temp.linux-armv7l-3.9/source/py_gpio.o -o build/lib.linux-armv7l-3.9/Adafruit_BBIO/GPIO.cpython-39-arm-linux-gnueabihf.so
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:15: multiple definition of `version'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:15: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:14: multiple definition of `both_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:14: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:13: multiple definition of `falling_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:13: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:12: multiple definition of `rising_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:12: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:11: multiple definition of `pud_down'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:11: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:10: multiple definition of `pud_up'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:10: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:9: multiple definition of `pud_off'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:9: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:8: multiple definition of `alt0'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:8: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:7: multiple definition of `output'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:7: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:6: multiple definition of `input'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:6: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:5: multiple definition of `low'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:5: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:4: multiple definition of `high'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/source/constants.h:4: 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 io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xujn1a0r/adafruit-bbio_a69bd43b231d49d2a888708ed247db62/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-m6chmhf8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/Adafruit-BBIO Check the logs for full command output.

version.sh

git:/opt/scripts/:[81709cddd6994c0c6895b5d31a73ac459f252fa0]
eeprom:[A335BNLTBWA51712EW002791]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BBBW-WL1835-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0]
kernel:[4.19.94-ti-r61]
nodejs:[v10.24.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210416.0-0~buster+20210416]
pkg:[bb-customizations]:[1.20210225.0-0~buster+20210225]
pkg:[bb-usb-gadgets]:[1.20200504.0-0~buster+20200504]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   66.676503] remoteproc remoteproc0: wkup_m3 is available
[   66.952153] remoteproc remoteproc0: powering up wkup_m3
[   66.952185] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   66.952475] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   69.218580] remoteproc remoteproc1: 4a334000.pru is available
[   69.228212] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   69.218580] remoteproc remoteproc1: 4a334000.pru is available
[   69.218790] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[   69.228212] remoteproc remoteproc2: 4a338000.pru is available
[   69.228400] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[    0.953913] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.967181] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
buu-huu commented 3 years ago

So I just flashed the BeagleBone Black again for a clean installation, and now the Adafruit_BBIO library was directly installed. I did not have to install it manually. Don't know, what went wrong the last time.