Install spaCy 快速安装spaCy步骤
附上spaCy官方网站:https://spacy.io/usage#quickstart
Installation instructions
本文默认你已配置好conda环境,python,Spyder等等。
下面开始安装…
推荐conda环境下,打开anaconda prompt, install spaCy via conda-forge:
// An highlighted block
conda install -c conda-forge spacy
download a language model
After installation we need to download a language model.
Models
spaCy v2.0 features new neural models for tagging, parsing and entity recognition.
spaCy’s models can be installed as Python packages, just like any other module.
Models can be installed from a download URL or a local directory, manually or via pip. Their data can be located anywhere on your file system.
试过了下载本地,由于windows系统的环境变量很恶心,跳了几次总出错,推荐使用download URL方法下载
anaconda prompt输入:
// An highlighted block
# With external URL
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz
install成功:
// An highlighted block
(base) C:\Users\nan>python -m spacy download en_core_web_sm
Collecting en_core_web_sm==2.0.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#egg=en_core_web_sm