ModuleNotFoundError: No module named 'audioop'

I am trying to build a discord bot using python version 3.13.1 and whenever i try to run the code it throws me this error ModuleNotFoundError: No module named ‘audioop’ I have tried reinstalling both python and discord.py but they did not work. Any help will be appreciated.

try to install like this:

python3 -m pip install -U discord.py[voice]

and you may need some dependency

$ apt install libffi-dev libnacl-dev python3-dev

https://discordpy.readthedocs.io/en/stable/intro.html#installing

This did not fix it so I googled audioop to understand why it was not included in the library.
Turns out python 3.13 libraries do not include this module which is why it was throwing that error, anyways just installed the previous version of python(3.12.8) and now I am not getting any errors. TY for ur help

1 Like