haotian-liu / LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.
https://llava.hliu.cc
Apache License 2.0
19.96k stars 2.2k forks source link

Dependency errors #1660

Open Chanete opened 2 months ago

Chanete commented 2 months ago

Describe the issue

Issue:Dependency errors installing installing sglang

Command:

pip install "sglang[all]"

Log:


ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
llava 1.2.2.post1 requires tokenizers==0.15.1, but you have tokenizers 0.19.1 which is incompatible.
llava 1.2.2.post1 requires torch==2.1.2, but you have torch 2.4.0 which is incompatible.
llava 1.2.2.post1 requires torchvision==0.16.2, but you have torchvision 0.19.0 which is incompatible.
llava 1.2.2.post1 requires transformers==4.37.2, but you have transformers 4.44.0 which is incompatible.

Screenshots:

maghol21 commented 2 months ago

there is many solution:

1- "select the version":

pip install torch==2.1.2 torchvision==0.16.2 tokenizers==0.15.1 transformers==4.37.2
pip install "sglang[all]"

2- use ignore istalled option: pip install "sglang[all]" --ignore-installed

3- use virtual environment:

python -m venv myenv

#in Windows:
myenv\Scripts\activate
#In macOS/Linux:
source myenv/bin/activate

pip install "sglang[all]"

4- uninstall then install:

pip uninstall llava
pip install "sglang[all]"
pip install llava