Baichuan-7B [BUG] requirements.txt 依赖冲突

piah890a  于 2个月前  发布在  其他
关注(0)|答案(6)|浏览(43)

所需先决条件

系统信息

1

问题描述

ERROR: Cannot install -r requirements.txt (line 1), -r requirements.txt (line 6) and torch==2.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested torch==2.0.0
    deepspeed 0.9.2 depends on torch
    xformers 0.0.20 depends on torch==2.0.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/topics/dependency-resolution/#dealing-with-dependency-conflicts

可重现示例代码

Python代码片段:
命令行:
额外依赖项:
重现步骤:

回溯

  • 无响应*

预期行为

  • 无响应*

其他上下文

  • 无响应*

检查清单

  • 我已经提供了所有相关和必要的信息。
  • 我已为这个问题选择了一个合适的标题。
uplii1fm

uplii1fm1#

同样遇到此问题

2admgd59

2admgd592#

后面我把torch的指定版本去掉,直接装最新的,可以跑

w7t8yxp5

w7t8yxp53#

后续我们会提供一个conda-recipe,近期会在README中更新。

anauzrmj

anauzrmj4#


无法安装,这个安装过程太难了。

tjrkku2a

tjrkku2a5#

我也遇到了这个问题。

INFO: pip is looking at multiple versions of transformers to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of torch to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of sentencepiece to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of deepspeed to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 1), -r requirements.txt (line 6) and torch==2.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested torch==2.0.0
    deepspeed 0.9.2 depends on torch
    xformers 0.0.20 depends on torch==2.0.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
eagi6jfj

eagi6jfj6#

我按如下方式修改 requirements.txt 后,就可以了。

diff --git a/requirements.txt b/requirements.txt
index 65fcfcf..4eb6bd1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
 deepspeed==0.9.2
 numpy==1.23.5
 sentencepiece==0.1.97
-torch==2.0.0
+torch==2.0.1
 transformers==4.29.1
 xformers==0.0.20

相关问题