installation error

Hi I'm trying to install prodigy and getting this error when running prodigy stats

prodigy stats -l
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/prodigy/main.py", line 50, in
main()
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/prodigy/main.py", line 44, in main
controller = run_recipe(run_args)
^^^^^^^^^^^^^^^^^^^^
File "cython_src/prodigy/cli.pyx", line 111, in prodigy.cli.run_recipe
File "cython_src/prodigy/cli.pyx", line 36, in prodigy.cli.get_cli
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/prodigy/recipes/init.py", line 1, in
from . import (
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/prodigy/recipes/audio.py", line 3, in
from ..components.preprocess import fetch_media as fetch_media_preprocessor
File "cython_src/prodigy/components/preprocess.pyx", line 7, in init prodigy.components.preprocess
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/spacy/init.py", line 6, in
from .errors import setup_default_warnings
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/spacy/errors.py", line 3, in
from .compat import Literal
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/spacy/compat.py", line 39, in
from thinc.api import Optimizer # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/thinc/api.py", line 1, in
from .backends import (
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/thinc/backends/init.py", line 17, in
from .cupy_ops import CupyOps
File "/Users/dmg/Desktop/Datasets/env/lib/python3.12/site-packages/thinc/backends/cupy_ops.py", line 16, in
from .numpy_ops import NumpyOps
File "thinc/backends/numpy_ops.pyx", line 1, in init thinc.backends.numpy_ops
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Hi @Dmg02,

This is related to the recent numpy v2.0.0. (released on 16/06/2024). There's a backwards-incompatible change that affects thinc and we are working on it.
In the meantime, to get unblocked you could install the previous version of numpy in your virtual env e.g.:

python -m pip install numpy==1.26.4

That should baypass the current issue.

Hi again @Dmg02,

Alternatively you could also upgrade to Prodigy 1.15.6 (we have just released it) - see here.

thank you so much for your help and rapid response!

1 Like