我使用以下命令(来自spacy网站这里)在Windows10home 64位下安装spacy和en_core_web_trf,但是在运行最后(第三行)命令时遇到了问题。
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_trf错误:
INFO: pip is looking at multiple versions of en-core-web-trf to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install en-core-web-trf because these package versions have conflicting dependencies.
The conflict is caused by:
spacy-transformers 1.1.4 depends on torch>=1.6.0
spacy-transformers 1.1.3 depends on torch>=1.6.0
spacy-transformers 1.1.2 depends on torch>=1.6.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies有人知道怎么解决吗?谢谢!我整晚都被困在这里。
卸载spacy并用pip install spacy-transformers -f https://download.pytorch.org/whl/torch_stable.html重新安装它后发生错误更新
ERROR: Cannot install spacy-transformers==0.5.0, spacy-transformers==0.5.1, spacy-transformers==0.5.2, spacy-transformers==0.5.3, spacy-transformers==0.6.1, spacy-transformers==0.6.2, spacy-transformers==1.0.0, spacy-transformers==1.0.1, spacy-transformers==1.0.2, spacy-transformers==1.0.3, spacy-transformers==1.0.4, spacy-transformers==1.0.5, spacy-transformers==1.0.6, spacy-transformers==1.1.0, spacy-transformers==1.1.1, spacy-transformers==1.1.2, spacy-transformers==1.1.3 and spacy-transformers==1.1.4 because these package versions have conflicting dependencies.
The conflict is caused by:
spacy-transformers 1.1.4 depends on torch>=1.6.0
spacy-transformers 1.1.3 depends on torch>=1.6.0
spacy-transformers 1.1.2 depends on torch>=1.6.0
spacy-transformers 1.1.1 depends on torch>=1.6.0
spacy-transformers 1.1.0 depends on torch>=1.6.0
spacy-transformers 1.0.6 depends on torch>=1.5.0
spacy-transformers 1.0.5 depends on torch>=1.5.0
spacy-transformers 1.0.4 depends on torch>=1.5.0
spacy-transformers 1.0.3 depends on torch>=1.5.0
spacy-transformers 1.0.2 depends on torch>=1.5.0
spacy-transformers 1.0.1 depends on torch>=1.5.0
spacy-transformers 1.0.0 depends on torch>=1.5.0
spacy-transformers 0.6.2 depends on spacy<2.4.0 and >=2.3.0
spacy-transformers 0.6.1 depends on spacy<2.4.0 and >=2.3.0
spacy-transformers 0.5.3 depends on spacy<2.3.0 and >=2.2.1
spacy-transformers 0.5.2 depends on spacy<2.3.0 and >=2.2.1
spacy-transformers 0.5.1 depends on spacy<2.3.0 and >=2.2.1
spacy-transformers 0.5.0 depends on spacy<2.3.0 and >=2.2.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies发布于 2022-01-16 12:55:43
给那些和我有同样问题的人。
上述问题最终没有得到解决,至少我试图重新安装软件包,重新安装python (重新安装之前完全卸载它)。对我没什么用。
我最后是怎么避免这一切的?
我完全卸载了python。
安装Anaconda (最新版本),在安装Anaconda的同时,也默认安装pip和python。然后,我在windows命令行中使用pip install XX,无论是安装spacy,还是安装requirements.txt,都很好。这就是我是如何避免上述问题的。
希望这对也有这个问题的人有帮助。
发布于 2022-01-15 21:24:56
尝试:
pip uninstall spacy-transformers 1.1.4
pip uninstall spacy-transformers 1.1.3
pip uninstall spacy-transformers 1.1.2
然后执行:
pip install spacy-transformers -f https://download.pytorch.org/whl/torch_stable.html您可以在https://pypi.org/project/spacy-transformers/上找到完整的安装过程。
https://stackoverflow.com/questions/70725486
复制相似问题