Baichuan-7B icon indicating copy to clipboard operation
Baichuan-7B copied to clipboard

[BUG] requirements.txt 依赖冲突

Open 631068264 opened this issue 1 year ago • 6 comments

Required prerequisites

System information

1

Problem description

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

Reproducible example code

The Python snippets:


Command lines:


Extra dependencies:


Steps to reproduce:

Traceback

No response

Expected behavior

No response

Additional context

No response

Checklist

  • [X] I have provided all relevant and necessary information above.
  • [X] I have chosen a suitable title for this issue.

631068264 avatar Jun 25 '23 01:06 631068264

同样遇到此问题

greensea avatar Jun 29 '23 09:06 greensea

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

631068264 avatar Jun 29 '23 09:06 631068264

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

zmsn-2077 avatar Jun 30 '23 14:06 zmsn-2077

image 装都装不上 这个安装过程 太难嘞。

dayphosphor avatar Jul 07 '23 05:07 dayphosphor

我也遇到了这个问题。


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

caiyesd avatar Jul 07 '23 05:07 caiyesd

我按如下方式修改 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

caiyesd avatar Jul 07 '23 06:07 caiyesd