Skip to content

Restrict Python version to <3.12 due to incompatible dependencies#24

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-pip-install-stable-codec-error
Draft

Restrict Python version to <3.12 due to incompatible dependencies#24
Copilot wants to merge 3 commits intomainfrom
copilot/fix-pip-install-stable-codec-error

Conversation

Copy link

Copilot AI commented Feb 12, 2026

pip install stable-codec fails on Python 3.12 with build errors from PyWavelets==1.4.1 and pandas==2.0.2, which are pinned by stable-audio-tools and lack Python 3.12 wheels.

Changes

  • setup.py: Restrict python_requires='>=3.9,<3.12' (was >=3.9)
  • setup.py: Bump version to 0.1.3
  • README.md: Document Python 3.9-3.11 compatibility requirement
  • .gitignore: Add build artifacts

User Impact

Before:

× Getting requirements to build wheel did not run successfully.
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'

After:

ERROR: Package 'stable-codec' requires a different Python: 3.12.3 not in '<3.12,>=3.9'

Notes

Python 3.12+ support requires stable-audio-tools to relax its dependency pins (PyWavelets>=1.5.0, pandas>=2.1.0 have Python 3.12 wheels).

Original prompt

This section details on the original issue you should resolve

<issue_title>pip install stable-codec fails</issue_title>
<issue_description>when running pip install stable-codec i get errors:

pip install stable-codec
Collecting stable-codec
  Using cached stable_codec-0.1.2-py3-none-any.whl.metadata (8.3 kB)
Requirement already satisfied: packaging in ./.env/lib/python3.12/site-packages (from stable-codec) (25.0)
Collecting wheel (from stable-codec)
  Using cached wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
Collecting torch==2.4 (from stable-codec)
  Using cached torch-2.4.0-cp312-cp312-manylinux1_x86_64.whl.metadata (26 kB)
Collecting torchaudio==2.4 (from stable-codec)
  Using cached torchaudio-2.4.0-cp312-cp312-manylinux1_x86_64.whl.metadata (6.4 kB)
Collecting stable-audio-tools==0.0.17 (from stable-codec)
  Using cached stable_audio_tools-0.0.17-py3-none-any.whl.metadata (1.3 kB)
Collecting pytorch-lightning==2.1 (from stable-codec)
  Using cached pytorch_lightning-2.1.0-py3-none-any.whl.metadata (23 kB)
Collecting prefigure==0.0.9 (from stable-codec)
  Using cached prefigure-0.0.9-py3-none-any.whl.metadata (5.9 kB)
Collecting argparse (from prefigure==0.0.9->stable-codec)
  Using cached argparse-1.4.0-py2.py3-none-any.whl.metadata (2.8 kB)
Collecting configparser (from prefigure==0.0.9->stable-codec)
  Using cached configparser-7.2.0-py3-none-any.whl.metadata (5.5 kB)
Requirement already satisfied: wandb in ./.env/lib/python3.12/site-packages (from prefigure==0.0.9->stable-codec) (0.21.4)
Collecting gin-config (from prefigure==0.0.9->stable-codec)
  Using cached gin_config-0.5.0-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: numpy>=1.17.2 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (2.3.3)
Requirement already satisfied: tqdm>=4.57.0 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (4.67.1)
Requirement already satisfied: PyYAML>=5.4 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (6.0.2)
Requirement already satisfied: fsspec>2021.06.0 in ./.env/lib/python3.12/site-packages (from fsspec[http]>2021.06.0->pytorch-lightning==2.1->stable-codec) (2025.9.0)
Requirement already satisfied: torchmetrics>=0.7.0 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (1.8.2)
Requirement already satisfied: typing-extensions>=4.0.0 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (4.15.0)
Requirement already satisfied: lightning-utilities>=0.8.0 in ./.env/lib/python3.12/site-packages (from pytorch-lightning==2.1->stable-codec) (0.15.2)
Collecting alias-free-torch==0.0.6 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached alias_free_torch-0.0.6-py3-none-any.whl.metadata (3.8 kB)
Collecting auraloss==0.4.0 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached auraloss-0.4.0-py3-none-any.whl.metadata (8.0 kB)
Collecting descript-audio-codec==1.0.0 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached descript_audio_codec-1.0.0-py3-none-any.whl.metadata (7.8 kB)
Requirement already satisfied: einops in ./.env/lib/python3.12/site-packages (from stable-audio-tools==0.0.17->stable-codec) (0.8.1)
Collecting einops-exts (from stable-audio-tools==0.0.17->stable-codec)
  Using cached einops_exts-0.0.4-py3-none-any.whl.metadata (621 bytes)
Collecting ema-pytorch==0.2.3 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached ema_pytorch-0.2.3-py3-none-any.whl.metadata (693 bytes)
Requirement already satisfied: encodec==0.1.1 in ./.env/lib/python3.12/site-packages (from stable-audio-tools==0.0.17->stable-codec) (0.1.1)
Collecting gradio>=3.42.0 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached gradio-5.47.2-py3-none-any.whl.metadata (16 kB)
Requirement already satisfied: huggingface_hub in ./.env/lib/python3.12/site-packages (from stable-audio-tools==0.0.17->stable-codec) (0.35.0)
Collecting importlib-resources==5.12.0 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached importlib_resources-5.12.0-py3-none-any.whl.metadata (4.1 kB)
Collecting k-diffusion==0.1.1 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached k_diffusion-0.1.1-py3-none-any.whl.metadata (3.9 kB)
Collecting laion-clap==1.1.4 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached laion_clap-1.1.4-py3-none-any.whl.metadata (26 kB)
Collecting local-attention==1.8.6 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached local_attention-1.8.6-py3-none-any.whl.metadata (684 bytes)
Collecting pandas==2.0.2 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached pandas-2.0.2.tar.gz (5.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting PyWavelets==1.4.1 (from stable-audio-tools==0.0.17->stable-codec)
  Using cached PyWavelets-1.4.1.tar.gz (4.6 MB)
  Installing build dependen...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes Stability-AI/stable-codec#22

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Copilot AI and others added 2 commits February 12, 2026 13:09
Co-authored-by: julian-parker <19472441+julian-parker@users.noreply.github.com>
Co-authored-by: julian-parker <19472441+julian-parker@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pip install stable-codec failure during installation Restrict Python version to <3.12 due to incompatible dependencies Feb 12, 2026
Copilot AI requested a review from julian-parker February 12, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants