Skip to content

Error installing: ValueError: numpy.dtype size changed #135

Open
@BryceStevenWilley

Description

@BryceStevenWilley

Having a lot of trouble installing FormFyxer on a fresh virtual env. Below is the error

    File "/tmp/pip-build-env-jyabgwzo/overlay/lib/python3.10/site-packages/thinc/backends/__init__.py", line 17, in <module>
     from .cupy_ops import CupyOps
  File "/tmp/pip-build-env-jyabgwzo/overlay/lib/python3.10/site-packages/thinc/backends/cupy_ops.py", line 16, in <module>
     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

Related to explosion/spaCy#13528, but I seem to be having the same error when I fix the version of numpy to below 2.0.0. Not sure why the obvious fix isn't working, but pip runs all of it in a temporary dir that gets deleted, so I can't see what actual code is being run there.

Workaround is just to remove the entire InstallSpacyModelCommand:

FormFyxer/setup.py

Lines 9 to 14 in fce8447

class InstallSpacyModelCommand(install):
def run(self):
install.run(self)
import spacy
print("Downloading word2vec model en_core_web_sm")
spacy.cli.download('en_core_web_sm')

That workaround won't fly for our situation, but I'll have to see if it breaks our GH actions as well, or if it's just on my machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions