pinocchio: ImportError: No module named pinocchio

Hi, I have already successfully installed pinocchio on my OS ubuntu 14.04 according to the instruction(build from source). However, when I run the python examples, I was told that pinocchio cannot be found:

shihao@shihao-OptiPlex-7040:~/pinocchio/examples/python$ python fd-derivatives.py 
Traceback (most recent call last):
  File "fd-derivatives.py", line 20, in <module>
    import pinocchio as pin
ImportError: No module named pinocchio

I think that it should be a path problem, so I add /usr/local/lib/python2.7/site-packages/ to the python sys.path. However, this path addition brings about another error

shihao@shihao-OptiPlex-7040:~/pinocchio/examples/python$ python fd-derivatives.py 
Traceback (most recent call last):
  File "fd-derivatives.py", line 20, in <module>
    import pinocchio as pin
  File "/usr/local/lib/python2.7/site-packages/pinocchio/__init__.py", line 18, in <module>
    from pinocchio.robot_wrapper import RobotWrapper
  File "/usr/local/lib/python2.7/site-packages/pinocchio/robot_wrapper.py", line 17, in <module>
    from . import libpinocchio_pywrap as se3
ImportError: libpinocchio.so: cannot open shared object file: No such file or directory

I am not sure what I should do next. Can you help me with this problem?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Dear @erwincoumans, I’m not aware of any installation setup for Pinocchio using pip. But for Python bindings, you can use conda:

conda install pinocchio -c conda-forge

Is it working for you? Best,

Justin

PS: for info, we are not currently supporting pip because it is too hard to check and get access to dependencies such as urdf, boost, etc.