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.
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.
I am experiencing a problem importing the UART part of the Adafruit_BBIO module:
Importing the library with
import Adafruit_BBIO
does not result in an error. But anyways, I am not able to access UART viaAdafruit_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 viapip
. I installed the module manually by cloning the repository and runningsetup.py
. When I try to install it withsudo pip3 install Adafruit_BBIO
it gives me that bunch of errors:version.sh