bdaiinstitute / spatialmath-python

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
MIT License
519 stars 84 forks source link

spatialmath import error #80

Closed mostafanorouzi closed 10 months ago

mostafanorouzi commented 1 year ago

i got this error when run on jetson nano python 3.6 :

Traceback (most recent call last): File "", line 1, in File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/init.py", line 1, in from spatialmath.pose2d import SO2, SE2 File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/pose2d.py", line 26, in from spatialmath.base import argcheck File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/base/init.py", line 7, in from spatialmath.base.transforms2d import * # lgtm [py/polluting-import] File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/base/transforms2d.py", line 20, in import spatialmath.base as smb AttributeError: module 'spatialmath' has no attribute 'base'

from spatialmath import base as base Traceback (most recent call last): File "", line 1, in File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/init.py", line 1, in from spatialmath.pose2d import SO2, SE2 File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/pose2d.py", line 26, in from spatialmath.base import argcheck File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/base/init.py", line 7, in from spatialmath.base.transforms2d import * # lgtm [py/polluting-import] File "/home/sadid/pyenv/sadidrobot/lib/python3.6/site-packages/spatialmath/base/transforms2d.py", line 20, in import spatialmath.base as smb AttributeError: module 'spatialmath' has no attribute 'base'

petercorke commented 12 months ago

We're not supporting Python 3.6, 3.7 is the oldest. I can replicate your problem with Python 3.6 on a Mac. There have been changes with the semantics of import statements over time, but there are also other modern Python features that are used throughout the toolbox. Any chance you can upgrade?