You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import spacy
nlp = spacy.load("en_core_web_lg")
doc = nlp("This is a sentence.")
No error while run the python code using Pycharm IDE.
Matlab code for calling the python code
pyenv;
py.importlib.import_module('test_spacy');
path_add = fileparts(which('test_spacy.py'));
if count(py.sys.path, path_add) == 0
insert(py.sys.path, int64(0), path_add);
end
Error occurred while run the Matlab code: Error using numpy_ops>init thinc.backends.numpy_ops
Python Error: ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from
PyObject
Matlab and python codes all are in the same folder. Created a python project using PyCharm. Then crated the Matlab file and saved the file in the Python project file
@Saswati-Project The error you are encountering is a common issue that arises due to a version mismatch between different Python libraries, particularly NumPy and libraries that depend on it, such as spaCy.
You may try these steps and check whether the issue is solved or not?
Verify the Python Environment in MATLAB:-
check it through: -
pyenv
Make sure this environment matches the one used in PyCharm. If not, you can set the Python environment in MATLAB using-
How to reproduce the behaviour
Python code: File name: test_spacy.py
No error while run the python code using Pycharm IDE.
Matlab code for calling the python code
Error occurred while run the Matlab code: Error using numpy_ops>init thinc.backends.numpy_ops
Python Error: ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from
PyObject
Matlab and python codes all are in the same folder. Created a python project using PyCharm. Then crated the Matlab file and saved the file in the Python project file
Your Environment
The text was updated successfully, but these errors were encountered: