LAVIS icon indicating copy to clipboard operation
LAVIS copied to clipboard

Build issues with decord for Mac with Python 3.9+

Open jhwang7628 opened this issue 3 years ago • 8 comments

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?

jhwang7628 avatar Oct 05 '22 22:10 jhwang7628

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 avatar Oct 06 '22 08:10 dxli94

@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?

Nutlope avatar Dec 03 '22 19:12 Nutlope

@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?

dxli94 avatar Dec 04 '22 01:12 dxli94

ERROR: Could not find a version that satisfies the requirement decord (from versions: none) ERROR: No matching distribution found for decord

Marco75116 avatar Jan 18 '23 18:01 Marco75116

is it solved ?

taki0112 avatar Feb 08 '23 06:02 taki0112

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 Screen Shot 2023-02-15 at 4 57 11 PM

prithvi-srinivasan avatar Feb 16 '23 01:02 prithvi-srinivasan

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.

thoklei avatar Feb 18 '23 13:02 thoklei

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

hiwgy avatar Feb 23 '23 08:02 hiwgy

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.

This worked for getting past the decord error. Especially for running the colab notebook example in LAVIS's Homepage on github

itissid avatar Jun 08 '23 18:06 itissid

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

omar404ahmed avatar Aug 03 '23 10:08 omar404ahmed

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

thatrandomfrenchdude avatar Jan 17 '24 20:01 thatrandomfrenchdude

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:

  1. install ffmpeg@4 using brew install ffmpeg@4
  2. update the link since I had ffmpeg5 using brew link --overwrite ffmpeg@4
  3. install decode from source using instructions here
  4. install lavis from PyPi using pip install salesforce-lavis

thatrandomfrenchdude avatar Jan 17 '24 20:01 thatrandomfrenchdude