2.4.安装spaCy
2.4.安装spaCy
进入Anaconda的prompt命令行界面,执行如下:
(base) C:\Users\toto>pip install spaCy -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spaCy
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/bb/85/0bfb96f7cca73f1acd44b35ae64ddc236f778307288d2c7e3a760a5fdbfb/spacy-3.0.3-cp38-cp38-win_amd64.whl (11.8 MB)
Collecting preshed<3.1.0,>=3.0.2
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e3/b1/3b94d70bb1261dffa7fe3aedbf94204a5b24c41fed8c3e71971b4767b039/preshed-3.0.5-cp38-cp38-win_amd64.whl (112 kB)
Collecting spacy-legacy<3.1.0,>=3.0.0
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
c:\users\toto\appdata\local\pip\cache\wheels\32\95\37\0790630b6ab8d0d0c7a34d406cc368159736c164789fe7dd8c\smart_open-3.0.0-py3-none-any.whl
Requirement already satisfied: MarkupSafe>=0.23 in d:\installed\anaconda\lib\site-packages (from jinja2->spaCy) (1.1.1)
Requirement already satisfied: six in d:\installed\anaconda\lib\site-packages (from packaging>=20.0->spaCy) (1.15.0)
Requirement already satisfied: pyparsing>=2.0.2 in d:\installed\anaconda\lib\site-packages (from packaging>=20.0->spaCy) (2.4.7)
Installing collected packages: murmurhash, cymem, preshed, spacy-legacy, catalogue, srsly, typer, pydantic, smart-open, pathy, blis, wasabi, thinc, spaCy
Successfully installed blis-0.7.4 catalogue-2.0.1 cymem-2.0.5 murmurhash-1.0.5 pathy-0.4.0 preshed-3.0.5 pydantic-1.7.3 smart-open-3.0.0 spaCy-3.0.3 spacy-legacy-3.0.1 srsly-2.4.0 thinc-8.0.1 typer-0.3.2 wasabi-0.8.2
(base) C:\Users\toto>
然后执行:
(base) C:\Users\toto>python -m spacy download en
可能会报如下错误:
解决办法是:
https://blog.csdn.net/hjzgj263446/article/details/103527952
en_core_web_sm-2.2.5:网盘下载(https://pan.baidu.com/s/1D6fc7O9IK0v0jS9j5zqTcw) 提取码:jnmw
en_core_web_md-2.2.5:网盘下载(https://pan.baidu.com/s/1L2H15fHE40w0JXhuoV2HaQ) 提取码:wzq5
de_core_news_sm-2.3.0:网盘下载(https://pan.baidu.com/s/1e4jnbyrkQEPaqrBZDQKKFA) 提取码:3hbz
GitHub上有其他版本对应的下载:https://github.com/explosion/spacy-models/releases
下载好后
pip install /文件路径/en_core_web_sm-2.2.5.tar.gz
效果图:
https://github.com/explosion/spacy-models/releases
还没有评论,来说两句吧...