-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Downgrading Python does not work
## Description
Running Pydub on Python 3.13 fails at import time due to missing `audioop` / `pyaudioop`.
Error:
ModuleNotFoundError: No module named 'pyaudioop'
Traceback points to:
File "pydub/utils.py", line 16, in
import pyaudioop as audioop
## Environment
- Python version: 3.13.0
- OS: Windows 10
- Pydub version: 0.25.1 (latest from PyPI)
## Steps to Reproduce
1. Install Python 3.13
2. `pip install pydub`
3. Run:
```python
from pydub import AudioSegment
Expected Behavior
Pydub should import successfully without requiring unavailable modules.
Actual Behavior
Fails with:
ModuleNotFoundError: No module named 'pyaudioop'
Notes
-
Python 3.13 removed the stdlib
audioopmodule (PEP 594). -
Pydub currently tries to import
pyaudioop, but:audioopis gone from stdlibpyaudioopis not installable via pip on Python 3.13 (no wheels, build fails).
-
This leaves Pydub completely broken on Python 3.13 with no pip-installable fix.
Possible Fixes
- Vendor or bundle the
audioopfunctionality Pydub depends on - Or mark
pyaudioopas a required dependency and ensure wheels are published for Python 3.13 - Or add a graceful fallback so Pydub works without
audioopfeatures
POSSIBLE PR
OLD
#import pyaudioop as audioop
NEW
try:
import audioop
except ImportError:
try:
import pyaudioop as audioop
except ImportError:
audioop = None # Gracefully disable audioop-dependent features
Add pyaudioop as an optional dependency (so builds don’t break when no wheel is available):
[project.optional-dependencies]
audio = ["pyaudioop>=0.1.0"]
Workarounds
- Downgrading to Python 3.12 resolves the issue
- There is currently no pip-installable way to get
audioop/pyaudioopon Python 3.13
---
Tethrarxitet, glass-ships, space-contributes, juancarlos2701, samuelbradshaw and 4 morereneleonhardt and croneterspace-contributes
Metadata
Metadata
Assignees
Labels
No labels