salesforce / LAVIS

LAVIS - A One-stop Library for Language-Vision Intelligence
BSD 3-Clause "New" or "Revised" License
9.89k stars 971 forks source link

installing on Colab error #641

Open moghadas76 opened 9 months ago

moghadas76 commented 9 months ago

Obtaining file:///content/LAVIS-XInstructBLIP Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... done Collecting contexttimer (from salesforce-lavis==1.0.1) Using cached contexttimer-0.3.3.tar.gz (4.9 kB) Preparing metadata (setup.py) ... done Collecting decord (from salesforce-lavis==1.0.1) Using cached decord-0.6.0-py3-none-manylinux2010_x86_64.whl (13.6 MB) Collecting diffusers<=0.16.0 (from salesforce-lavis==1.0.1) Using cached diffusers-0.16.0-py3-none-any.whl (934 kB) Collecting einops>=0.4.1 (from salesforce-lavis==1.0.1) Using cached einops-0.7.0-py3-none-any.whl (44 kB) Collecting fairscale==0.4.4 (from salesforce-lavis==1.0.1) Using cached fairscale-0.4.4.tar.gz (235 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting ftfy (from salesforce-lavis==1.0.1) Using cached ftfy-6.1.3-py3-none-any.whl (53 kB) Collecting iopath (from salesforce-lavis==1.0.1) Using cached iopath-0.1.10.tar.gz (42 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (7.34.0) Collecting omegaconf (from salesforce-lavis==1.0.1) Using cached omegaconf-2.3.0-py3-none-any.whl (79 kB) Collecting opencv-python-headless==4.5.5.64 (from salesforce-lavis==1.0.1) Using cached opencv_python_headless-4.5.5.64-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.8 MB) Collecting opendatasets (from salesforce-lavis==1.0.1) Using cached opendatasets-0.1.22-py3-none-any.whl (15 kB) Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (23.2) Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (1.5.3) Requirement already satisfied: plotly in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (5.15.0) Collecting pre-commit (from salesforce-lavis==1.0.1) Using cached pre_commit-3.6.0-py2.py3-none-any.whl (204 kB) Collecting pycocoevalcap (from salesforce-lavis==1.0.1) Using cached pycocoevalcap-1.2-py3-none-any.whl (104.3 MB) Requirement already satisfied: pycocotools in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (2.0.7) Collecting python-magic (from salesforce-lavis==1.0.1) Using cached python_magic-0.4.27-py2.py3-none-any.whl (13 kB) Requirement already satisfied: scikit-image in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (0.19.3) Collecting sentencepiece (from salesforce-lavis==1.0.1) Using cached sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) Requirement already satisfied: spacy in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (3.6.1) Collecting streamlit (from salesforce-lavis==1.0.1) Using cached streamlit-1.30.0-py2.py3-none-any.whl (8.4 MB) Collecting timm==0.4.12 (from salesforce-lavis==1.0.1) Using cached timm-0.4.12-py3-none-any.whl (376 kB) Requirement already satisfied: torch>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (2.1.0+cu121) Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (0.16.0+cu121) Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (4.66.1) Collecting transformers==4.33.2 (from salesforce-lavis==1.0.1) Using cached transformers-4.33.2-py3-none-any.whl (7.6 MB) Collecting webdataset (from salesforce-lavis==1.0.1) Using cached webdataset-0.2.86-py3-none-any.whl (70 kB) Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (0.42.0) Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (2.1.0+cu121) Requirement already satisfied: soundfile in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (0.12.1) Requirement already satisfied: moviepy in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (1.0.3) Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from salesforce-lavis==1.0.1) (3.8.1) Collecting peft (from salesforce-lavis==1.0.1) Using cached peft-0.7.1-py3-none-any.whl (168 kB) Collecting easydict==1.9 (from salesforce-lavis==1.0.1) Using cached easydict-1.9.tar.gz (6.4 kB) Preparing metadata (setup.py) ... done Collecting pyyaml-env-tag==0.1 (from salesforce-lavis==1.0.1) Using cached pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB) INFO: pip is looking at multiple versions of salesforce-lavis to determine which version is compatible with other requirements. This could take a while. ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement open3d==0.13.0 (from salesforce-lavis) (from versions: 0.16.0, 0.17.0, 0.18.0) ERROR: No matching distribution found for open3d==0.13.0

bhramdath commented 9 months ago

I was having the same issue. It seems to be related to the most updated version of lavis loaded via github that allows for 3d image processing. If you don't need the 3D features, this fix worked for me:


install requirements

import sys

if 'google.colab' in sys.modules: print('Running in Colab.') !pip install salesforce-lavis %cd LAVIS !pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz else: !pip install omegaconf %cd ../.. !pip install . !pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz

%cd projects/img2prompt-vqa

itstreefam commented 6 months ago

I changed the line to "open3d>=0.13.0" in requirements.txt and reran pip install. It worked for me. My Python env is 3.10