因为一些原因需要在一个新的环境add_sapcy里安装spacytextblob
查询相关代码,输入如下:
install --target=~/anaconda3/envs/add_spacy/lib/python3.9/site-packages spacytextblob
输出如下:
Collecting spacytextblob
Using cached spacytextblob-4.0.0-py3-none-any.whl (4.5 kB)
Collecting textblob<0.16.0,>=0.15.3
Using cached textblob-0.15.3-py2.py3-none-any.whl (636 kB)
Collecting spacy<4.0,>=3.0
Using cached spacy-3.5.0-cp39-cp39-macosx_10_9_x86_64.whl (6.9 MB)
Collecting smart-open<7.0.0,>=5.2.1
Using cached smart_open-6.3.0-py3-none-any.whl (56 kB)
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.8-cp39-cp39-macosx_10_9_x86_64.whl (107 kB)
Collecting numpy>=1.15.0
Downloading numpy-1.24.1-cp39-cp39-macosx_10_9_x86_64.whl (19.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.8/19.8 MB 65.0 kB/s eta 0:00:0000:0100:08
Collecting pathy>=0.10.0
Using cached pathy-0.10.1-py3-none-any.whl (48 kB)
Collecting srsly<3.0.0,>=2.4.3
Using cached srsly-2.4.5-cp39-cp39-macosx_10_9_x86_64.whl (491 kB)
Collecting jinja2
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 48.9 kB/s eta 0:00:00a 0:00:01
Collecting pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4
Using cached pydantic-1.10.4-cp39-cp39-macosx_10_9_x86_64.whl (2.9 MB)
Collecting wasabi<1.2.0,>=0.9.1
Downloading wasabi-1.1.1-py3-none-any.whl (27 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.7-cp39-cp39-macosx_10_9_x86_64.whl (32 kB)
Collecting langcodes<4.0.0,>=3.2.0
Using cached langcodes-3.3.0-py3-none-any.whl (181 kB)
Collecting typer<0.8.0,>=0.3.0
Using cached typer-0.7.0-py3-none-any.whl (38 kB)
Collecting requests<3.0.0,>=2.13.0
Downloading requests-2.28.2-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 122.9 kB/s eta 0:00:0000:0100:01
Collecting setuptools
Using cached setuptools-66.1.1-py3-none-any.whl (1.3 MB)
Collecting tqdm<5.0.0,>=4.38.0
Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 43.2 kB/s eta 0:00:00a 0:00:01
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.9-cp39-cp39-macosx_10_9_x86_64.whl (18 kB)
Collecting spacy-legacy<3.1.0,>=3.0.11
Downloading spacy_legacy-3.0.12-py2.py3-none-any.whl (29 kB)
Collecting thinc<8.2.0,>=8.1.0
Downloading thinc-8.1.7-cp39-cp39-macosx_10_9_x86_64.whl (778 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 778.1/778.1 kB 57.0 kB/s eta 0:00:0000:0100:01
Collecting catalogue<2.1.0,>=2.0.6
Using cached catalogue-2.0.8-py3-none-any.whl (17 kB)
Collecting spacy-loggers<2.0.0,>=1.0.0
Using cached spacy_loggers-1.0.4-py3-none-any.whl (11 kB)
Collecting packaging>=20.0
Downloading packaging-23.0-py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 74.9 kB/s eta 0:00:00a 0:00:01
Collecting nltk>=3.1
Downloading nltk-3.8.1-py3-none-any.whl (1.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 50.2 kB/s eta 0:00:0000:0100:01
Collecting joblib
Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 kB 42.2 kB/s eta 0:00:00a 0:00:01
Collecting regex>=2021.8.3
Downloading regex-2022.10.31-cp39-cp39-macosx_10_9_x86_64.whl (293 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 293.9/293.9 kB 99.1 kB/s eta 0:00:0000:0100:01
Collecting click
Downloading click-8.1.3-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 91.4 kB/s eta 0:00:00a 0:00:01
Collecting typing-extensions>=4.2.0
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 kB 48.5 kB/s eta 0:00:00a 0:00:01
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_x86_64.whl (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.0/124.0 kB 109.3 kB/s eta 0:00:00a 0:00:01
Collecting certifi>=2017.4.17
Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 82.0 kB/s eta 0:00:00a 0:00:01
Collecting idna<4,>=2.5
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 60.4 kB/s eta 0:00:0000:0100:01
Collecting confection<1.0.0,>=0.0.1
Downloading confection-0.0.4-py3-none-any.whl (32 kB)
Collecting blis<0.8.0,>=0.7.8
Using cached blis-0.7.9-cp39-cp39-macosx_10_9_x86_64.whl (6.1 MB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl (13 kB)
Installing collected packages: cymem, charset-normalizer, wasabi, urllib3, typing-extensions, tqdm, spacy-loggers, spacy-legacy, smart-open, setuptools, regex, packaging, numpy, murmurhash, MarkupSafe, langcodes, joblib, idna, click, certifi, catalogue, typer, srsly, requests, pydantic, preshed, nltk, jinja2, blis, textblob, pathy, confection, thinc, spacy, spacytextblob
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
en-core-web-sm 3.3.0 requires spacy<3.4.0,>=3.3.0.dev0, but you have spacy 3.5.0 which is incompatible.
Successfully installed MarkupSafe-2.1.2 blis-0.7.9 catalogue-2.0.8 certifi-2022.12.7 charset-normalizer-3.0.1 click-8.1.3 confection-0.0.4 cymem-2.0.7 idna-3.4 jinja2-3.1.2 joblib-1.2.0 langcodes-3.3.0 murmurhash-1.0.9 nltk-3.8.1 numpy-1.24.1 packaging-23.0 pathy-0.10.1 preshed-3.0.8 pydantic-1.10.4 regex-2022.10.31 requests-2.28.2 setuptools-66.1.1 smart-open-6.3.0 spacy-3.5.0 spacy-legacy-3.0.12 spacy-loggers-1.0.4 spacytextblob-4.0.0 srsly-2.4.5 textblob-0.15.3 thinc-8.1.7 tqdm-4.64.1 typer-0.7.0 typing-extensions-4.4.0 urllib3-1.26.14 wasabi-1.1.1
随后检查是否安装成功:
pip show spacytextblob
输出:
WARNING: Package(s) not found: spacytextblob
Note: you may need to restart the kernel to use updated packages.
并没有安装成功
不知道是不是这里的问题:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
en-core-web-sm 3.3.0 requires spacy<3.4.0,>=3.3.0.dev0, but you have spacy 3.5.0 which is incompatible.
请问大家有什么解决方法吗?谢谢!🙏