Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues with decord for Mac with Python 3.9+ #15

Closed
jhwang7628 opened this issue Oct 5, 2022 · 12 comments
Closed

Build issues with decord for Mac with Python 3.9+ #15

jhwang7628 opened this issue Oct 5, 2022 · 12 comments

Comments

@jhwang7628
Copy link

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 jhwang7628 changed the title Build issues with decord Build issues with decord for Mac with Python 3.9+ Oct 5, 2022
@dxli94
Copy link
Contributor

dxli94 commented Oct 6, 2022

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.

@Nutlope
Copy link

Nutlope commented Dec 3, 2022

@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
Copy link
Contributor

dxli94 commented Dec 4, 2022

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

@Marco75116
Copy link

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

@taki0112
Copy link

taki0112 commented Feb 8, 2023

is it solved ?

@prithvi-srinivasan
Copy link

prithvi-srinivasan commented Feb 16, 2023

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

@thoklei
Copy link

thoklei commented Feb 18, 2023

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.

@hiwgy
Copy link

hiwgy commented Feb 23, 2023

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

@itissid
Copy link

itissid commented Jun 8, 2023

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

@omar404ahmed
Copy link

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

@thatrandomfrenchdude
Copy link

thatrandomfrenchdude commented Jan 17, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests