3

I am running this command.

import bar_chart_race as bcr
bcr.bar_chart_race(df=covid_df,filename=None,figsize=(3.5,3),title='Covid-19 Cases by State',n_bars=10)

Getting the below error

Exception: You do not have ffmpeg installed on your machine. Download
                            ffmpeg from here: https://www.ffmpeg.org/download.html.
                            
                            Matplotlib's original error message below:

                            Requested MovieWriter (ffmpeg) not available

Have already installed the module

D:\py\Scripts>pip install ffmpeg-python
Requirement already satisfied: ffmpeg-python in d:\py\lib\site-packages (0.1)

D:\py\Scripts>
EXODIA
  • 908
  • 3
  • 10
  • 28

3 Answers3

3

The ffmpeg-python module and ffmpeg are two different things. You need to install ffmpeg from the link of the error Message

https://www.ffmpeg.org/download.html

HackLab
  • 509
  • 3
  • 10
  • I cant download the external applications from my system due to system policies. Is there an alternative way for this ? – EXODIA Jun 29 '20 at 18:47
  • I mean I can download but cant install – EXODIA Jun 29 '20 at 18:50
  • According to `bar_chart_race` you need ffmpeg or magick https://www.dexplo.org/bar_chart_race/installation/. You can try to find another lib, that uses ffmpeg-python, so far I don`t know any. Matplotlib has a bit larger variety of video writers you may find there something that works for you. – HackLab Jun 29 '20 at 18:57
  • 2
    @EXODIA you can`t install it since it "only" requires to unzip it and add the bin folder to the path variable? – HackLab Jun 29 '20 at 19:10
3

For those of you who are able to download the ffmpeg file. Here are the steps to activate it.

  1. Install the ffmpeg in your cmd using pip or conda:

    conda install -c conda-forge ffmpeg
    

    or

    pip install ffmpeg-python    
    
  2. Download the ffmpeg zip file from the following link.

    Since I have Windows OS, I need to put the ffmpeg's bin folder into the path. Unzip the file you've download and copy paste it inside your C: for instance. Put the bin folder to the path using the steps from this link.

Note! After these steps you can check the instalation by runnig this command in your terminal:

ffmpeg -version

In this case you should not see: 'ffmpeg' is not recognized as an internal or external ecoomand.

For detailed explanation check out this webpage.

0

Run it on COlab it will work It happened to me on Jupture Only

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 06 '23 at 12:49