如何解决pyinstaller可执行文件导入错误“异常值:类型对象'spacy.syntax.nn_parser.array'没有属性'__reduce_cython__'”?

时间:2019-03-26 11:35:54

标签: django python-3.x pyinstaller spacy binaries

我已经使用pyinstaller创建了一个exec,但是当我执行它时出现错误:

Django Version: 1.8
Exception Type: AttributeError
Exception Value:    
type object 'spacy.syntax.nn_parser.array' has no attribute '__reduce_cython__'

以下是我的Spec文件:

# -*- mode: python -*-

block_cipher = None


a = Analysis(['manage.py'],
             pathex=['.envLibsite-packagesscipyextra-dll', '/root/binaries/q_c'],
             binaries=[],
             datas=[],
             hiddenimports=['django.contrib.admin.apps', 'cymem.cymem', 'thinc.linalg', 'murmurhash.mrmr', 'cytoolz.utils', 'cytoolz._signatures', 'spacy.strings', 'spacy.morphology', 'spacy.lexeme', 'spacy.tokens', 'spacy.gold', 'spacy.tokens.underscore', 'spacy.parts_of_speech', 'dill', 'spacy.tokens.printers', 'spacy.tokens._retokenize', 'spacy.syntax', 'spacy.syntax.stateclass', 'spacy.syntax.transition_system', 'spacy.syntax.nonproj', 'spacy.syntax.nn_parser', 'spacy.syntax.arc_eager', 'thinc.extra.search', 'spacy.syntax._beam_utils', 'spacy.syntax.ner', 'thinc.neural._classes.difference', 'scipy._lib.messagestream', 'sklearn.neighbors.typedefs', 'spacy.lang.en', 'django.contrib.auth.apps', 'sklearn.feature_extraction', 'sklearn.svm', 'srsly.msgpack.util', 'preshed.maps', 'thinc.neural._aligned_alloc', 'blis', 'blis.py', 'django.contrib.contenttypes.apps', 'django.contrib.messages.apps'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='q_c',
          debug=False,
          strip=False,
          upx=True,
          runtime_tmpdir=None,
          console=True )

有人可以帮助我解决此问题吗?

0 个答案:

没有答案