2

我是 Ubuntu 和 Python 的新手,正在练习 Python 的 Spacy 库。我正在关注使用该模块的 Spacy 库的本教程。nlp因此,我必须安装它,但是当我使用以下命令时

pip install nlp

然后它给出以下结果:

Collecting nlp
  Could not find a version that satisfies the requirement nlp (from versions: )
No matching distribution found for nlp

我搜索了它,但直到现在还没有找到任何解决方案。

4

2 回答 2

1

这是您需要安装的 spacy 模块。

pip install spacy

然后你可以使用它的nlp:

import spacy
nlp = spacy.load('en')
doc = nlp(u"Apples and oranges are similar. Boots and hippos aren't.")
于 2017-03-02T18:56:26.397 回答
1

你需要使用这个:

import spacy
nlp = spacy.load('en')
于 2017-03-02T18:58:36.313 回答