pc-ble-driver-py
pc-ble-driver-py copied to clipboard
Breaks on MacOS Monterey, hardcoded library location
You guys hardcoded your library to look for python where it ends up when installing from https://www.python.org/downloads/macos. This means if you instead install with brew you get an error like
ImportError: dlopen(.../lib/python3.9/site-packages/pc_ble_driver_py/lib/_nrf_ble_driver_sd_api_v5.so, 0x0002): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.9/Python
Referenced from: .../lib/python3.9/site-packages/pc_ble_driver_py/lib/_nrf_ble_driver_sd_api_v5.so
Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.9/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.9/Python' (no such file)
I can work around the issue by creating a symlink
ln -s /usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/ /Library/Frameworks/Python.framework/Versions/3.9
but I shouldn't have to. This should be fixed to work with python installs in either location.
This leads several workarounds & extra documentation around projects that based on pc-ble-driver-py so fix would be more than welcome. I guess this should not need much effort overall..
I have the same issue except it's looking for Python version 2.7 in system directory:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pc_ble_driver_py/lib/macos_osx/_pc_ble_driver_sd_api_v3.so, 0x0002): Library not loaded: '/System/Library/Frameworks/Python.framework/Versions/2.7/Python'
Referenced from: '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pc_ble_driver_py/lib/macos_osx/_pc_ble_driver_sd_api_v3.so'
Reason: tried: '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file)
Why is yours looking for 3.9? I can't symlink as 2.7 isn't installed on my system.
Edit: nevermind. pip doesn't seem to install the latest verson. I grabbed pc_ble_driver_py-0.17.0-cp310-cp310-macosx_10_9_x86_64.whl
from the releases page and it worked