ModuleNotFoundError for ffmpeg

Hi I’m trying to deploy my app on streamlit but have modulenotfounderror. I’m following this repo and added both ffmpeg for packages.txt and ffmpeg-python for requirements.txt. The potential cause is probably that I used ‘import ffmpeg’ in a separate class other than the main.py file

Fixed! I checked back to the log again and found that Streamlit was using pipfile for dependencies instead of packages.txt or requirements.txt. I deleted pipfile and it works now. Just wondering why is there duplicates?

Hello, I have add the ffmpeg==4.3.1 in my requirements file but now I’m getting this error.

ERROR: No matching distribution found for ffmpeg==4.3.1

Please Guide

Hi @Nouman-Hasan :wave:

Neither the ffmpeg package nor ffmepg-python have a release versioned 4.3.1. Double check what version you want, make sure it exists, and only then include that version in your requirements.txt.

image
Thanks for replying. I am using ffmpeg version 4.3.1

Put this into your *.txt files:

packages.txt

ffmpeg

requirements.txt

ffmpeg-python
3 Likes

So it looks you’re talking about a conda package. In that case, you must use environment.yml instead of requirements.txt to specify Python dependencies. :smile:

https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually

E.g.:

channels:
  - conda-forge
dependencies:
  - ffmpeg=4.3.1
1 Like

Thank you so much. This worked

thanks :wave:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.