使用Pyinstaller exe时出现“没有属性'reduce_cython"错误 [英] “has no attribute 'reduce_cython” error when using Pyinstaller exe

查看:145
本文介绍了使用Pyinstaller exe时出现“没有属性'reduce_cython"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用pyinstaller将我的Python文件转换为exe.执行它时出现以下错误,

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

AttributeError:类型对象'neuralcoref.neuralcoref.array'没有属性' reduce_cython ',我正在使用Python 3.6.7,Pyinstaller 4.0,NeuralCoref 4,Spacy 2.1.0,Cython 0.27.3.

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.

是否有人建议解决此问题或将.py转换为exe的更好方法?我尝试了py2exe,Cxfreee,但没有用.

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

我的代码的最低版本:

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,

推荐答案

这可以在cython 0.28中解决.请看这里

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

这篇关于使用Pyinstaller exe时出现“没有属性'reduce_cython"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆