Troubles installing FFMPEG

I have in my dockerfile to pip install ffmpeg but when I go into my terminal and try to locate the version, I get no result. Anyone have an idea on how to install ffmpeg, that would be greatly appreciated. Thanks

Hello,
Can you link exactly which PyPi ffmpeg Python package you are trying to install through your dockerfile? I was able to find an exact match which was ffmpeg · PyPI and several others

Also, please do provide the exact error message you are getting. Thanks!

If you can, please do send the Dockerfile you are using to install the dependencies as well.

Hello, thank you for the reply. Here is the error code I am getting from my discord python bot. I’m trying to play a local audio file but as I execute the command I get the error FFMPEG is not found. I believe its installed but not running. Any help is appreciated!

 main  Ignoring exception in command whatami:
 main  Traceback (most recent call last):
 main    File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
 main      ret = await coro(*args, **kwargs)
 main    File "/app/main.py", line 116, in whatami
 main      source = FFmpegPCMAudio('clip5.mp3')
 main    File "/usr/local/lib/python3.9/site-packages/discord/player.py", line 225, in __init__
 main      super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 main    File "/usr/local/lib/python3.9/site-packages/discord/player.py", line 138, in __init__
 main      self._process = self._spawn_process(args, **kwargs)
 main    File "/usr/local/lib/python3.9/site-packages/discord/player.py", line 147, in _spawn_process
 main      raise ClientException(executable + ' was not found.') from None
 main  discord.errors.ClientException: ffmpeg was not found.
 main  
 main  The above exception was the direct cause of the following exception:
 main  
 main  Traceback (most recent call last):
 main    File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 902, in invoke
 main      await ctx.command.invoke(ctx)
 main    File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 864, in invoke
 main      await injected(*ctx.args, **ctx.kwargs)
 main    File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
 main      raise CommandInvokeError(exc) from exc
 main  discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found.

Here is my dockerfile and requirements.txt:

FROM python:3.9.2

WORKDIR /app

COPY ./requirements.txt /app

ENV PYTHONUNBUFFERED 1

RUN pip3 install --no-cache-dir -r requirements.txt

# really for ever file

# COPY ./main.py .

# COPY ./env.py .

COPY . .

# eviroments

# COPY .env .

CMD ["python", "main.py"]

# CMD ["python", "env.py"]

# CMD ["python", "-m", " discord", "--version"]

# CMD ["ping", "8.8.8.8"]

# CMD ['python', 'main.py']

Requirements.txt

    discord.py>=1.6

    python-dotenv==0.13.0

    ffmpeg-python

    python-ffmpeg

    ffmpeg

    discord.py[voice]>=1.3.0

Hi Andy,

It looks like this package is expecting the ffmpeg application to be installed. Try adding a line to your Dockerfile like:
RUN apt-get update && apt-get install -y ffmpeg