“has no attribute 'reduce_cython” error when using Pyinstaller exe

自古美人都是妖i 提交于 2021-02-05 08:00:35

问题


I used pyinstaller to convert my Python file to exe. While executing it I got the below error,

AttributeError: type object 'neuralcoref.neuralcoref.array' has no attribute 'reduce_cython' I'm using Python 3.6.7, Pyinstaller 4.0, NeuralCoref 4, Spacy 2.1.0, Cython 0.27.3.

Any suggestion to solve this or better way to convert .py to exe? I've tried py2exe, Cxfreee but doesnt work.

A minimal version of my code:

import neuralcoref
def ApplyCorefResolutionToPreProcessedMail(text, nlp):
    # load NeuralCoref and add it to the pipe of SpaCy's model
    coref = neuralcoref.NeuralCoref(nlp.vocab) 
    nlp.add_pipe(coref, name='neuralcoref')
    doc = nlp(text)
    corefresolvedmail = doc._.coref_resolved
    return corefresolvedmail

I have attached the stack trace below,


回答1:


This might be resolved in cython 0.28 look here https://github.com/cython/cython/issues/1953



来源:https://stackoverflow.com/questions/57175603/has-no-attribute-reduce-cython-error-when-using-pyinstaller-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!