Python 3.13

ModuleNotFoundError: No module named 'audioop'

ModuleNotFoundError: No module named 'audioop'

What it means

audioop was removed from the standard library in Python 3.13 under PEP 594. Code that imports it fails immediately on 3.13, including indirectly through libraries such as pydub.

Why it happens

PEP 594 removed nineteen legacy 'dead batteries' modules in Python 3.13 after deprecating them in 3.11. audioop was one of them. The import error often surfaces from a dependency rather than your own code.

How to fix it

  1. Confirm the interpreter: `python3 -VV`. The module still exists on 3.12 and earlier, so this only appears after a 3.13 upgrade.
  2. Find who imports it: `grep -rn 'import audioop' .` and check your dependencies too, since libraries like pydub import it internally.
  3. For a pure-Python drop-in, the community package `audioop-lts` was published specifically to restore this module on 3.13+.
  4. For new work, prefer a maintained audio library (for example `soundfile`, `librosa`, or `numpy` for raw sample maths) rather than reviving the removed module.
  5. If you are not ready to migrate, pin to Python 3.12 deliberately and record the reason, rather than pinning by accident.

Check configured patterns in your project

The free EOLkits scanner processes files in your browser and flags selected related patterns in supported IaC and dependency files. File names and contents are not uploaded; bounded aggregate file and finding counts may be sent. It is not a complete source or AWS-account scan.

Prefer a 10-second check? Paste your config into the free AWS EOL checker. Pasted input is not uploaded; bounded first-party usage events may be sent.

Primary source: https://docs.python.org/3/whatsnew/3.13.html

Inspect the $299 report sample and availability →