You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library is generated as /usr/lib/python3.6/site-packages/bluetooth/_bluetooth.cpython-36m-x86_64-linux-gnu.so (which does target the good architecture, not x86_64 as the name implies), and Python fails to load it due to mismatching arch in the filename:
Traceback (most recent call last):
File "./bt_test.py", line 3, in <module>
import bluetooth
File "/usr/lib/python3.6/site-packages/bluetooth/__init__.py", line 45, in <module>
from bluetooth.bluez import *
File "/usr/lib/python3.6/site-packages/bluetooth/bluez.py", line 10, in <module>
import bluetooth._bluetooth as _bt
ModuleNotFoundError: No module named 'bluetooth._bluetooth'
Moving the .so to /usr/lib/python3.6/site-packages/bluetooth/_bluetooth.so cascades into yet another error:
ImportError: Error relocating /usr/lib/python3.6/site-packages/bluetooth/_bluetooth.so: Py_InitModule4: symbol not found
This means the .so is built for Python 2 as the Py_InitModule family of symbols are not used any more since Python 3 (nm -D /usr/lib/python3.6/site-packages/bluetooth/_bluetooth.so | grep Py_InitModule4 shows it's an undefined symbol so the linker tries to import it, alas in vain).
Something is most likely wrong with the cross-compilation environment.
Installing PyBluez from pip works properly.
The text was updated successfully, but these errors were encountered:
System
Void 4.14.52_1 armv7l-musl uptodate r
python3-bluez-0.22_3
Steps to reproduce the behavior
Import the
bluetooth
module in Python 3.Expected behavior
Importing the
bluetooth
module on Python 3 works.Actual behavior
Library is generated as
/usr/lib/python3.6/site-packages/bluetooth/_bluetooth.cpython-36m-x86_64-linux-gnu.so
(which does target the good architecture, not x86_64 as the name implies), and Python fails to load it due to mismatching arch in the filename:Moving the .so to
/usr/lib/python3.6/site-packages/bluetooth/_bluetooth.so
cascades into yet another error:This means the
.so
is built for Python 2 as thePy_InitModule
family of symbols are not used any more since Python 3 (nm -D /usr/lib/python3.6/site-packages/bluetooth/_bluetooth.so | grep Py_InitModule4
shows it's an undefined symbol so the linker tries to import it, alas in vain).Something is most likely wrong with the cross-compilation environment.
Installing
PyBluez
from pip works properly.The text was updated successfully, but these errors were encountered: