pmneila / PyMCubes

Marching cubes (and related tools) for Python
BSD 3-Clause "New" or "Revised" License
709 stars 89 forks source link

ValueError: numpy.ufunc size changed, may indicate binary incompatibility. #38

Closed ashawkey closed 1 year ago

ashawkey commented 1 year ago

Problem

The release of 0.1.3 fails to import:

In [1]: import mcubes
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-c29732f53359> in <module>
----> 1 import mcubes

~\anaconda3\lib\site-packages\mcubes\__init__.py in <module>
      1
----> 2 from ._mcubes import marching_cubes, marching_cubes_func
      3 from .exporter import export_mesh, export_obj, export_off
      4 from .smoothing import smooth, smooth_constrained, smooth_gaussian

mcubes\src\_mcubes.pyx in init mcubes._mcubes()

ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 232 from C header, got 216 from PyObject

Environment

Verified on both Windows and Ubuntu. numpy version: 1.21.4 mcubes version: 0.1.3

pmneila commented 1 year ago

Hi,

Could you try updating NumPy to 1.23 or newer?

pmneila commented 1 year ago

Hi again,

I have just updated the build system of PyMCubes to support all available NumPy versions (hopefully). Just update the package to the latest version, which should be 0.1.4 now:

python -m pip install --upgrade PyMCubes

Sorry for the inconvenience. Let me know if the problem persists.

Best.

ashawkey commented 1 year ago

Thanks for the timely reply! The problem has gone now!