robotics-toolbox-python
robotics-toolbox-python copied to clipboard
Installing both numba and roboticstoolbox breaks roboticstoolbox
Describe the bug
Installing roboticstoolbox-python in an environment with an existing numba install leads to the following error when trying to import roboticstoolbox:
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf Traceback (most recent call last): File "
", line 1, in File "/home/sdiebolt/.cache/pypoetry/virtualenvs/pyfus-ae9x7n-S-py3.9/lib/python3.9/site-packages/roboticstoolbox/init.py", line 3, in from roboticstoolbox.robot import * File "/home/sdiebolt/.cache/pypoetry/virtualenvs/pyfus-ae9x7n-S-py3.9/lib/python3.9/site-packages/roboticstoolbox/robot/init.py", line 1, in from roboticstoolbox.robot.Robot import Robot File "/home/sdiebolt/.cache/pypoetry/virtualenvs/pyfus-ae9x7n-S-py3.9/lib/python3.9/site-packages/roboticstoolbox/robot/Robot.py", line 19, in from roboticstoolbox.robot.ETS import ETS File "/home/sdiebolt/.cache/pypoetry/virtualenvs/pyfus-ae9x7n-S-py3.9/lib/python3.9/site-packages/roboticstoolbox/robot/ETS.py", line 43, in from fknm import ( ImportError: numpy.core.multiarray failed to import
Version information
roboticstoolbox-python was installed from PyPi, version 1.0.2. Numba was also installed from PyPi, version 0.55.2.
To Reproduce
- Create a new Python 3.10 environment.
- Install numba using
pip install numba - Install roboticstoolbox using
pip install roboticstoolbox-python - Launch a python interpreter and run
import roboticstoolbox.
Expected behavior roboticstoolbox should be imported without error.
Environment (please complete the following information):
- Ubuntu 22.04
- Python 3.10
Additional context I think the problem might come from the fact that numba uses numpy<1.23.0, while roboticstoolbox has no max numpy version. From the error, it seems like roboticstoolbox was built using a different numpy version than the one installed. I might be wrong though, I'm not that familiar wit Python module building.