I want to call my python script from the Matlab. I received the error 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.
The Python script is as follows
def text_recognizer(model_path, text):
nlp = spacy.load(model_path)
print("Model loaded successfully.")
ent_labels = [(ent.text, ent.label_) for ent in doc.ents]
The Matlab script is as follows
py.importlib.import_module('final_output');
path_add = fileparts(which('final_output.py'));
if count(py.sys.path, path_add) == 0
insert(py.sys.path, int64(0), path_add);
model_path = 'D:\trained_model\\output\\model-best';
pyOut = py.final_output.text_recognizer(model_path, text);
entity_labels = cell(pyOut);
I found one solution to update numpy, what I did, but nothing changed.
How can I fix the issue?