尝试加载spacy时python抛出一些错误

时间:2020-03-09 12:03:16

标签: python nlp installation package spacy

import pandas as pd
from ast import literal_eval
from nltk.corpus import stopwords
import string


stops = stopwords.words('english')
stops.extend(['none'])

import nltk

import re
import numpy as np
from pprint import pprint

import gensim
import gensim.corpora as corpora
from gensim.utils import simple_preprocess # for tokenizing
from gensim.models import CoherenceModel
from sklearn.feature_extraction import stop_words

import spacy

错误是:


AttributeError跟踪(最近一次呼叫最近) 在 20来自sklearn.feature_extraction导入stop_words 21 ---> 22种进口杂货 23 24个导入pyLDAvis

〜\ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy__init __。py在 从Thinc.neural.util导入10时需要require_gpu 11 ---> 12。进口管道 从.cli.info导入13作为cli_info .glossary import中的14解释

〜\ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy \ pipeline__init __。py在 2从__future__导入unicode_literals 3 ----> 4从.pipes导入Tagger,DependencyParser,EntityRecognizer,EntityLinker 5从.pipes导入TextCategorizer,Tensorizer,Pipe和Sentencizer 6从.morphologizer导入Morphologizer

pipes.pyx in初始spacy.pipeline.pipes()

〜\ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy \ syntax \ nn_parser.cp37-win_amd64.pyd init spacy.syntax.nn_parser()

AttributeError:类型对象'spacy.syntax.nn_parser.array'没有属性'__reduce_cython __'

0 个答案:

没有答案