首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:无法安装en-core-web-trf,因为这些包版本有相互冲突的依赖关系。

错误:无法安装en-core-web-trf,因为这些包版本有相互冲突的依赖关系。
EN

Stack Overflow用户
提问于 2022-01-15 21:13:05
回答 2查看 5K关注 0票数 1

我使用以下命令(来自spacy网站这里)在Windows10home 64位下安装spacy和en_core_web_trf,但是在运行最后(第三行)命令时遇到了问题。

代码语言:javascript
复制
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_trf

错误:

代码语言:javascript
复制
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重新安装它后发生错误更新

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-01-16 12:55:43

给那些和我有同样问题的人。

上述问题最终没有得到解决,至少我试图重新安装软件包,重新安装python (重新安装之前完全卸载它)。对我没什么用。

我最后是怎么避免这一切的?

我完全卸载了python。

安装Anaconda (最新版本),在安装Anaconda的同时,也默认安装pip和python。然后,我在windows命令行中使用pip install XX,无论是安装spacy,还是安装requirements.txt,都很好。这就是我是如何避免上述问题的。

希望这对也有这个问题的人有帮助。

票数 0
EN

Stack Overflow用户

发布于 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

然后执行:

代码语言:javascript
复制
pip install spacy-transformers -f https://download.pytorch.org/whl/torch_stable.html

您可以在https://pypi.org/project/spacy-transformers/上找到完整的安装过程。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70725486

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档