baichuan-inc / Baichuan-7B

A large-scale 7B pretraining language model developed by BaiChuan-Inc.
https://huggingface.co/baichuan-inc/baichuan-7B
Apache License 2.0
5.67k stars 506 forks source link

[BUG] requirements.txt 依赖冲突 #82

Open 631068264 opened 1 year ago

631068264 commented 1 year ago

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:

1. 2. 3.

Traceback

No response

Expected behavior

No response

Additional context

No response

Checklist

greensea commented 1 year ago

同样遇到此问题

631068264 commented 1 year ago

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

zmsn-2077 commented 1 year ago

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

dayphosphor commented 1 year ago
image

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

caiyesd commented 1 year ago

我也遇到了这个问题。


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 commented 1 year ago

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