_dexcelbot_sdk extension (.so / .dll / .dylib / .pyd)dexcelbot_apexhand_sdk.py shipped together with the native librariesThe SDK uses
ctypesand pybind11 to load the C++ backend, so correctly placing the shared libraries and exposing them to the loader is critical.
your_project/
├─ python/
│ ├─ dexcelbot_apexhand_sdk.py
│ ├─ _dexcelbot_sdk.cp311-win_amd64.pyd # or platform‑specific .so / .dylib
│ └─ lib/
│ ├─ libdexcelbot_xxx.dll
│ └─ ...
└─ examples/
└─ basic_control.py
dexcelbot_apexhand_sdk.py will:
python/lib/ into sys.path.libdexcelbot*.so / .dylib / .dll._dexcelbot_sdk.If the SDK is distributed as a Python package, from the SDK root run:
pip install -e .
Then in your project:
from dexcelbot_apexhand_sdk import DexcelBot
dexcelbot_apexhand_sdk.py into your project (for example your_project/python/)._dexcelbot_sdk.* and the lib/ folder preserving the original relative layout.sys.path in your script:import sys
from pathlib import Path
SDK_ROOT = Path(__file__).parent / "python"
sys.path.insert(0, str(SDK_ROOT))
from dexcelbot_apexhand_sdk import DexcelBot
If _dexcelbot_sdk cannot be imported, the SDK raises an ImportError with details. Common causes and fixes:
sys.pathpip install -e .
_dexcelbot_sdk to sys.path.python/lib/ contains libdexcelbot*.so / .dll / .dylib.cmake --build ... succeeded and copy the produced libraries into python/lib/.LD_LIBRARY_PATH:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/dexcelbot_sdk/python/lib
PATH.After installation, run a minimal script:
from dexcelbot_apexhand_sdk import DexcelBot, ErrorCode
bot = DexcelBot()
print("SDK instance created successfully")
# If no real hardware is connected yet, just call disconnect to verify linkage
result = bot.disconnect()
print("disconnect() returned:", result)
If the script imports and instantiates DexcelBot without errors, your Python‑side SDK setup is correct and you can proceed to network and hardware configuration.