pyomeca / ezc3d

Easy to use C3D reader/writer for C++, Python and Matlab
https://pyomeca.github.io/Documentation/ezc3d/index.html
MIT License
142 stars 44 forks source link

ezc3d and Opensim 4.4 clashes #284

Closed adrianrivadulla closed 1 year ago

adrianrivadulla commented 1 year ago

Similar to what reported in previous issues, I've installed Opensim 4.4 and the opensim python sdk and it created the following problem when I try to import my previous independent ezc3d package:

from . import _ezc3d

ImportError: DLL load failed: The specified procedure could not be found.

I have tried reinstalling ezc3d, removing the opensim library from that virtual environment but it didn't help so it seems to be related to the Path?

is there any fix for thish?

pariterre commented 1 year ago

Hi there!

Since you experiencing DLL issues, I'll assume you are running Windows. How did you installed/compiled ezc3d? Windows can be very picky when linking libraries!

adrianrivadulla commented 1 year ago

Hi thanks for your quick reply!

This was on Windows indeed. I had ezc3d installed via conda (conda -c install -c conda-forge ezc3d). I then installed Opensim and tried installing the sdk in the same environment I had ezc3d. The installation completed but then opensim wouldn't import here so I ended up creating a new environment to use opensim.

When I came back to the environment where I had ezc3d, the problem outlined in my previous message started. I tried reinstalling ezc3d, creating a _ezc3d.dll in the opensim sdk folder inspired by an issue reported in this repo, uninstalled opensim from this environment, none of these seemed to work. I recreated my environment from an old .yml I had prior to installing opensim, now ezc3d works as it used to and opensim works in its own evironment too. It's a shame I can't have everything in the same environment but not the end of the world!

If you happen to know how to fix it I am happy to give it a go, otherwise don't bother and I'll carry on with what I got and keep an eye on Github in case a solution that works comes out.

Thank you!

pariterre commented 1 year ago

It is indeed a Windows problem that I unfortunately have no control on. You must use the same ezc3d versions in order for what you want to do to work. I can't recall what is the version used in OpenSim 4.4, but it is definitely not the latest as it was release few weeks ago. If you manage to find which version was used when compiling the OpenSim 4.4, you can force conda to install this version, which in turn will allow you to have them both in the same environment :)