Install & Compatibility
Where this runs
tested against v4.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.024s · 19MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.016s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PortHandler
✓ from dynamixel_sdk import PortHandler
PacketHandler
✓ from dynamixel_sdk import PacketHandler
✗ from dynamixel_sdk.dynamixel import PacketHandler
Internal module path changed; use top-level import.
GroupSyncWrite
✓ from dynamixel_sdk import GroupSyncWrite
✗ from dynamixel_sdk.group_sync_write import GroupSyncWrite
Top-level import is the supported pattern since SDK 3.x.
GroupBulkRead
✓ from dynamixel_sdk import GroupBulkRead
Basic open port, enable torque, write position.
from dynamixel_sdk import PortHandler, PacketHandler
ADDR_TORQUE_ENABLE = 64
ADDR_GOAL_POSITION = 116
ADDR_PRESENT_POSITION = 132
PROTOCOL_VERSION = 2.0
DXL_ID = 1
DEVICENAME = '/dev/ttyUSB0'
BAUDRATE = 57600
port_handler = PortHandler(DEVICENAME)
packet_handler = PacketHandler(PROTOCOL_VERSION)
if port_handler.openPort():
print('Succeeded to open port')
else:
print('Failed to open port')
quit()
if port_handler.setBaudRate(BAUDRATE):
print('Succeeded to set baudrate')
else:
print('Failed to set baudrate')
quit()
# Enable torque
packet_handler.write1ByteTxRx(port_handler, DXL_ID, ADDR_TORQUE_ENABLE, 1)
# Write goal position
packet_handler.write4ByteTxRx(port_handler, DXL_ID, ADDR_GOAL_POSITION, 1024)
port_handler.closePort()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dynamixel_sdk'
Library not installed or installed in wrong environment.
fixRun `pip install dynamixel-sdk`. Ensure you are in the correct Python environment.
ImportError: cannot import name 'PacketHandler' from 'dynamixel_sdk'
Incorrect import path; SDK version 3.x and 4.x changed internal structure.
fixUse `from dynamixel_sdk import PacketHandler` (top-level).
[TxRxResult] There is no status packet!
Communication failure: wrong baudrate, port, protocol version, or servo ID.
fixVerify DEVICENAME, BAUDRATE (e.g. 57600 or 1000000), PROTOCOL_VERSION (1.0 or 2.0), and DXL_ID. Check wiring.
Upgrade
Version history
4.0.5latest on PyPI · released May 6, 2026
Audit
Dependencies
No dependency data recorded yet.