Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nicogene opened this issue Sep 29, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Nicogene
Copy link
Member

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

@Nicogene Nicogene added the bug Something isn't working label Sep 29, 2022
@Nicogene Nicogene self-assigned this Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant