https://github.com/allenai/allennlp allennlp官方安装步骤
安装allennlp库:
pip install allennlp
出现错误:
ERROR: Could not find a version that satisfies the requirement torch<1.8.0,>=1.6.0 (from allennlp) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch<1.8.0,>=1.6.0 (from allennlp)
解决could not find a version that satisfies the requirement torch等类似问题
安装torchvision出现ERROR: No matching distribution found for torch==1.4.0 (from torchvision)
在线安装老是出现错误,于是尝试下载allennlp的whl包,然后离线安装。
到网站上https://pypi.tuna.tsinghua.edu.cn/simple/allennlp/下载相应python版本的whl包,然后在Anaconda Prompt窗口转到whl包所在目录,pip install whl包,即可。
过程如下所示:
出现了报错,ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
textacy 0.10.1 requires spacy<3.0.0,>=2.2.0, but you'll have spacy 2.1.9 which is incompatible.
虽然出现了报错,但其实应该是已经安装成功了。