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

ModuleNotFoundError with numpy 2.0 #332

Open felixchenier opened 1 month ago

felixchenier commented 1 month ago

ezc3d doesn't import when NumPy 2 is installed.

NumPy 1

conda create -n test1 python=3.12 numpy=1 ezc3d

In this case, this is the version of ezc3d that gets installed:

ezc3d-1.5.10 |py312_python3_h265b4a9_2

>>> import ezc3d

works

NumPy 2

conda create -n test1 python=3.12 numpy=2 ezc3d

In this case, this is the version of ezc3d that gets installed:

ezc3d-1.5.10 |py312_octave_hcae72de_2

(Note "octave" instead of "python")

>>> import ezc3d
ModuleNotFoundError: No module named 'ezc3d'
pariterre commented 1 month ago

Hi @felixchenier

Trying to force the installation of python based ezc3d when forcing numpy=2 returns an error reporting fatal incompatibility (conda install ezc3d=*=*python* numpy=2 -cconda-forge)

Looking at the corresponding file in anaconda (https://anaconda.org/conda-forge/ezc3d/files) we can see that ezc3d is properly installed. That basically means that conda is not ready yet to install all dependencies of ezc3d if numpy 2 is required. This is not on my side I think, but only on conda-forge side which has not yet ported all their libraries to numpy 2