LAVIS
LAVIS copied to clipboard
Build issues with decord for Mac with Python 3.9+
Decord is listed as a dependency but there is no prebuilt binaries for Mac above Python 3.8 (see issues here). This means Mac users of LAVIS effectively have to stay below 3.8. Can we get rid of Decord and replace it with something that's more well-maintained?
Hi @jhwang7628 ,
Thanks for your interest.
Can you install decord if removing the requirement on its versions? E.g. decord>=0.6.0 into decord in requirement-dev.txt.
Thanks.
@dxli94 That didn't work for me. I even tried downgrading to python 3.8 and python 3.7, but kept getting the same issue. I'm on an M1 Mac. How can I fix this?
@dxli94 That didn't work for me. I even tried downgrading to python 3.8 and python 3.7, but kept getting the same issue. I'm on an M1 Mac. How can I fix this?
Hi @Nutlope , what is the error message you get?
ERROR: Could not find a version that satisfies the requirement decord (from versions: none) ERROR: No matching distribution found for decord
is it solved ?
Hi, from the other closed issue #122 , I tried removing decord from requirements. txt but it's still required by load_model_and_preprocess function. Check screenshot attached. So I'm unable to use it for calling BLIP2 @dxli94

So I'm unable to use it for calling BLIP2
Obviously not a viable long-term solution, but if all you (or anyone else coming here) want to do is just calling BLIP to do e.g. image captioning, you can clone the repo, comment out the decord imports in lavis/datasets/data_utils.py as well as commenting out / removing decord in requirements.txt, and then running pip install -e ., that worked for me.
Mac, M1
I have met and solved this problem like this: 1、brew install cmake ffmpeg@4, (ffmpeg5 not work,cause decord need ffmpeg4) 2、install decord from source code 3、install lavis from source code
So I'm unable to use it for calling BLIP2
Obviously not a viable long-term solution, but if all you (or anyone else coming here) want to do is just calling BLIP to do e.g. image captioning, you can clone the repo, comment out the decord imports in
lavis/datasets/data_utils.pyas well as commenting out / removing decord inrequirements.txt, and then runningpip install -e ., that worked for me.
This worked for getting past the decord error. Especially for running the colab notebook example in LAVIS's Homepage on github
Mac, M1
I have met and solved this problem like this: 1、brew install cmake ffmpeg@4, (ffmpeg5 not work,cause decord need ffmpeg4) 2、install decord from source code 3、install lavis from source code
This worked wonders, Thanks @hiwgy
Mac, M1
I have met and solved this problem like this: 1、brew install cmake ffmpeg@4, (ffmpeg5 not work,cause decord need ffmpeg4) 2、install decord from source code 3、install lavis from source code
I tried this and it worked successfully until I hit a dependency issue with LAVIS. LAVIS requires open3d==0.13.0 which is only supported by python 3.6, 3.7, and 3.8 (see docs).
I tried to downgrade to python 3.8, but decode requires >= python 3.9. Thus, stuck in a dependency loop. Will keep exploring and update if I find anything.
For reference, I am running python 3.11.2 on an M1 Pro Mac.
PS - if you have ffmpeg@5 installed, you need to overwrite the homebrew symlink.
brew link --overwrite ffmpeg@4
Mac, M1 I have met and solved this problem like this: 1、brew install cmake ffmpeg@4, (ffmpeg5 not work,cause decord need ffmpeg4) 2、install decord from source code 3、install lavis from source code
I tried this and it worked successfully until I hit a dependency issue with LAVIS. LAVIS requires open3d==0.13.0 which is only supported by python 3.6, 3.7, and 3.8 (see docs).
I tried to downgrade to python 3.8, but decode requires >= python 3.9. Thus, stuck in a dependency loop. Will keep exploring and update if I find anything.
For reference, I am running python 3.11.2 on an M1 Pro Mac.
PS - if you have ffmpeg@5 installed, you need to overwrite the homebrew symlink.
brew link --overwrite ffmpeg@4
Just to update on this, I finally got lavis to install. What worked for me was this:
- install ffmpeg@4 using
brew install ffmpeg@4 - update the link since I had ffmpeg5 using
brew link --overwrite ffmpeg@4 - install decode from source using instructions here
- install lavis from PyPi using
pip install salesforce-lavis