How to SOLVE Conflicting dependencies for Linux user
I use a machine turn in Ubuntu and i got a conflicting problem when i install all package with pip install -r requirements.txt, i got this error message :
INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 1) and -r requirements.txt (line 2) because these package versions have conflicting dependencies.
The conflict is caused by:
fastapi 0.95.1 depends on pydantic!=1.7, !=1.7.1, !=1.7.2, !=1.7.3, !=1.8, !=1.8.1, <2.0.0 and >=1.6.2
gradio 4.16.0 depends on pydantic>=2.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/topics/dependency-resolution/#dealing-with-dependency-conflicts
For solve this error if you get this to, change all the requirements.txt for this :
fastapi==0.100.1
gradio
gradio_imageslider==0.0.17
gradio_client
Markdown==3.4.1
numpy==1.24.2
requests==2.28.2
sentencepiece==0.1.98
tokenizers==0.13.3
torch
torchvision>=0.16.0
uvicorn==0.21.1
wandb==0.14.0
httpx==0.24.0
transformers==4.28.1
accelerate==0.18.0
scikit-learn==1.2.2
sentencepiece==0.1.98
einops==0.7.0
einops-exts==0.0.4
timm==0.9.8
openai-clip==1.0.1
fsspec
kornia==0.6.9
matplotlib==3.7.1
ninja==1.11.1
omegaconf==2.3.0
open-clip-torch==2.17.1
opencv-python==4.7.0.72
pandas==2.0.1
Pillow==9.4.0
pytorch-lightning==2.1.2
PyYAML==6.0
scipy==1.9.1
tqdm==4.65.0
triton==2.1.0
urllib3==1.26.15
webdataset==0.2.48
xformers>=0.0.20
And it's work for me after, hope that can help people.
Basically you could install all the newest packages, and remove specified == versions. just transformers needs to be transformers==4.28.1
after pip uninstall transformers pip install transformers==4.28.1
And you are set. All latest packages without conflict. Tested on Ubuntu and Windows PS. for Windows you need to create env with python=3.10 remove triton from txt requirements file and install it with: pip install https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/triton-2.1.0-cp310-cp310-win_amd64.whl --upgrade
Here is working content for the requirements.txt file for everyone else who encountered this issue (tested in Ubuntu Studio 23.10):
fastapi
gradio
gradio_imageslider
gradio_client
Markdown
numpy
requests
sentencepiece
tokenizers
torch>=2.1.0
torchvision>=0.16.0
uvicorn
wandb
httpx
transformers==4.28.1
accelerate
scikit-learn
sentencepiece
einops
einops-exts
timm
openai-clip
fsspec
kornia
matplotlib
ninja
omegaconf
open-clip-torch
opencv-python
pandas
Pillow
pytorch-lightning
PyYAML
scipy
tqdm
triton
urllib3
webdataset
xformers>=0.0.20
I also had to install additional packages to get the gfortran compiler (scipy needed it).
I use a machine turn in Ubuntu and i got a conflicting problem when i install all package with
pip install -r requirements.txt, i got this error message :INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while. ERROR: Cannot install -r requirements.txt (line 1) and -r requirements.txt (line 2) because these package versions have conflicting dependencies. The conflict is caused by: fastapi 0.95.1 depends on pydantic!=1.7, !=1.7.1, !=1.7.2, !=1.7.3, !=1.8, !=1.8.1, <2.0.0 and >=1.6.2 gradio 4.16.0 depends on pydantic>=2.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/topics/dependency-resolution/#dealing-with-dependency-conflictsFor solve this error if you get this to, change all the requirements.txt for this :
fastapi==0.100.1 gradio gradio_imageslider==0.0.17 gradio_client Markdown==3.4.1 numpy==1.24.2 requests==2.28.2 sentencepiece==0.1.98 tokenizers==0.13.3 torch torchvision>=0.16.0 uvicorn==0.21.1 wandb==0.14.0 httpx==0.24.0 transformers==4.28.1 accelerate==0.18.0 scikit-learn==1.2.2 sentencepiece==0.1.98 einops==0.7.0 einops-exts==0.0.4 timm==0.9.8 openai-clip==1.0.1 fsspec kornia==0.6.9 matplotlib==3.7.1 ninja==1.11.1 omegaconf==2.3.0 open-clip-torch==2.17.1 opencv-python==4.7.0.72 pandas==2.0.1 Pillow==9.4.0 pytorch-lightning==2.1.2 PyYAML==6.0 scipy==1.9.1 tqdm==4.65.0 triton==2.1.0 urllib3==1.26.15 webdataset==0.2.48 xformers>=0.0.20And it's work for me after, hope that can help people.
managed to get past installation on ubuntu 20.04 with pyenv 3.8 with this setup