I am trying to run the heart_rate_collector.py example in Nordic's pc-ble-driver-py bindings.
I cloned the pc-ble-driver-py bindings here and followed Nordic's instructions in the README.md. I was not able to build the project due to a CMake error, but I am hoping that is not necessary to run the heart_rate_collector.py example.
When I try to execute the file from pycharm, I receive the following error:
Traceback (most recent call last): File "C:/Users/elainechesoni/WindowsDev/pc-ble-driver-py/pc_ble_driver_py/examples/heart_rate_collector.py", line 208, in <module> init(sys.argv[1]) File "C:/Users/elainechesoni/WindowsDev/pc-ble-driver-py/pc_ble_driver_py/examples/heart_rate_collector.py", line 56, in init from pc_ble_driver_py.ble_driver import ( File "C:\Users\elainechesoni\WindowsDev\pc-ble-driver-py\pc_ble_driver_py\ble_driver.py", line 80, in <module> import pc_ble_driver_py.lib.nrf_ble_driver_sd_api_v5 as driver ModuleNotFoundError: No module named 'pc_ble_driver_py.lib.nrf_ble_driver_sd_api_v5'
I have tried following the instructions in this similar issue, by doing the following:
- Downloaded the zip from the link provided above (pc-ble-driver 4.1.1 for Windows x64)
- Placed the files in the pc-ble-driver-py/lib folder
- Changed the name to v5 lib to nrf_ble_driver_sd_api_v5
I still get the same error.
Can someone please help me?
P.S. For the sake of full discloser, I get the following error when I try to build the project:
>python setup.py bdist_wheel --build-type Debug ... -- Configuring incomplete, errors occurred! See also "C:/Users/elainechesoni/WindowsDev/pc-ble-driver-py/_skbuild/win-amd64-3.8/cmake-build/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\lib\site-packages\skbuild\setuptools_wrap.py", line 571, in setup env = cmkr.configure(cmake_args, File "C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\lib\site-packages\skbuild\cmaker.py", line 221, in configure raise SKBuildError( An error occurred while configuring with CMake. Command: "cmake" "C:\Users\elainechesoni\WindowsDev\pc-ble-driver-py" "-G" "Ninja" "-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\elainechesoni\WindowsDev\pc-ble-driver-py\_skbuild\win-amd64-3.8\cmake-install" "-DPYTHON_EXECUTABLE:FILEPATH=C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\python.exe" "-DPYTHON_VERSION_STRING:STRING=3.8.8" "-DPYTHON_INCLUDE_DIR:PATH=C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\Include" "-DPYTHON_LIBRARY:FILEPATH=C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\libs\python38.lib" "-DSKBUILD:BOOL=TRUE" "-DCMAKE_MODULE_PATH:PATH=C:\Users\elainechesoni\AppData\Local\Programs\Python\Python38\lib\site-packages\skbuild\resources\cmake" "-DCMAKE_BUILD_TYPE:STRING=Debug" Source directory: C:\Users\elainechesoni\WindowsDev\pc-ble-driver-py Working directory: C:\Users\elainechesoni\WindowsDev\pc-ble-driver-py\_skbuild\win-amd64-3.8\cmake-build Please see CMake's output for more information.