Skip to content

Error using yarp and idyntree bindings in Windows when Blender uses python 3.8 or greater #19

@Nicogene

Description

@Nicogene

When trying

import yarp (or idyntree)

with Blender with python > 3.8, if you installed the bindings via conda you get this error:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Users\ngenesio\AppData\Local\mambaforge\envs\robotologyenv\Lib\site-packages\yarp.py", line 15, in <module>
    import _yarp
ImportError: DLL load failed while importing _yarp: The specified module could not be found.

This is due to the fact that from Python 3.8 it changed basically how the DLL are loaded, see ref.

This problem is fixed if before import you call:

os.add_dll_directory("%CONDA_PREFIX%\\Library\\bin")

with %CONDA_PREFIX% expanded.

The best solution would be add to the script something like ROS2 bindings see ref

cc @traversaro

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions