Installation
Requirements
System Requirements
- Operating System: Linux / Windows / macOS
- Python: 3.10, 3.11, 3.12, 3.13, or 3.14
- Hardware: CAN interface (SocketCAN, PCAN) or serial adapter
Python Dependencies
The package automatically installs required dependencies:ctypes(standard library)dataclasses(standard library)
Install from PyPI
The recommended installation method:Install Specific Version
Upgrade Existing Installation
Verify Installation
Quick Test
Check Version
Test CLI
Test Gateway Command
motorbridge wheel also installs a standalone gateway launcher:
--is optional:motorbridge-gateway -- --helpandmotorbridge-gateway --helpare equivalent.
WS Gateway Quick Start (3 Platforms)
Usemotorbridge-gateway (the Python launcher for ws_gateway) directly after pip install.
A) Damiao serial bridge (dm-serial)
Ubuntu:
B) CAN path (auto/socketcan/pcan)
Ubuntu (SocketCAN):
dm-serialis Damiao-only.- For CAN path: Linux needs SocketCAN interface up (
ip link set can0 up), Windows needs PEAK PCAN driver +PCANBasic.dll, macOS needs PCBUSB runtime. - CLI/Gateway now print platform-specific dependency hints before startup.
- Keep default bind
127.0.0.1for local usage. If exposing non-loopback addresses, setMOTORBRIDGE_WS_TOKENand send it viax-motorbridge-tokenorAuthorization: Bearer ....
Pre-release Versions (TestPyPI)
For testing bleeding-edge features before official release:Pre-release versions may be unstable. Do not use in production.
Development Installation
From Source (Git)
Set Library Path (Source Builds Only)
If building from source without a packaged wheel:Virtual Environment (Recommended)
Isolate your installation using a virtual environment:System CAN Setup
Before using the SDK, ensure your CAN interface is configured:Linux (SocketCAN) software checks and bring-up
Windows (PCAN) software checks and bring-up
Recommended PowerShell (Admin) flow:macOS (PCBUSB) software checks and bring-up
macOS (PCBUSB) driver/runtime install (if missing)
IflibPCBUSB.dylib cannot be loaded, install PCBUSB first.
System-wide install:
Serial Port Permissions (Linux, dm-serial)
For DM serial bridge transport:Troubleshooting Installation
ImportError: cannot import name ‘Controller’
The ABI library cannot be found. Ensure:- You installed from a wheel (not just copying source)
libmotor_abi.sois in the package directory orLD_LIBRARY_PATH
Permission Denied on /dev/ttyACM0
CAN Interface Not Found
Windows PCAN runtime missing
If you seePCANBasic.dll missing:
- Install PEAK driver + PCAN-Basic runtime.
- Reopen terminal/IDE and retry.
- Prefer channels like
can0@1000000orcan1@1000000.
macOS PCBUSB runtime missing
If you seelibPCBUSB.dylib missing:
- Install PCBUSB runtime first.
- Ensure
libPCBUSB.dylibis in a searchable path (for example/usr/local/lib). - Reopen terminal and retry.
Next Steps
- Transports - Configure your communication layer
- Quickstart - Run your first motor control program