You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: Circular import on fresh installation #73
I am encountering a persistent circular import error when trying to use unitree_sdk2py, even in a completely clean environment.
System Information:
OS: Ubuntu
Python: Tried with both Python 3.12 and Python 3.8 (using fresh Conda environments)
Problem:
When importing any part of the library, it fails with the following traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/path/to/your/env/lib/python3.8/site-packages/unitree_sdk2py/init.py", line 1, in <module>
from . import idl, utils, core, rpc, go2, b2
ImportError: cannot import name 'b2' from partially initialized module 'unitree_sdk2py' (most likely due to a circular import) (/path/to/your/env/lib/python3.8/site-packages/unitree_sdk2py/init.py)
Steps to Reproduce:
This error can be reproduced reliably with the following steps in a clean Conda environment:
This consistently results in the ImportError. I have also tried installing via pip install unitree_sdk2py==1.0.1 directly, and the result is the same. The error seems to be in the package's structure itself.
Activity
perrynow commentedon Jun 4, 2025
can confirm this occurs as per instructions in the readme, is there a fix?
rayrsys commentedon Jun 8, 2025
i havent been able to find it
LBYPatrick commentedon Jun 25, 2025
Use
pip install -e <repo_path>instead.Kaweees commentedon Dec 14, 2025
The following merge requests fix this:
#126
#107