Skip to content

fix: Support Python 3.12 by relaxing numpy version constraint#404

Open
devbyteai wants to merge 1 commit intoresemble-ai:masterfrom
devbyteai:fix/python312-numpy-compatibility
Open

fix: Support Python 3.12 by relaxing numpy version constraint#404
devbyteai wants to merge 1 commit intoresemble-ai:masterfrom
devbyteai:fix/python312-numpy-compatibility

Conversation

@devbyteai
Copy link

@devbyteai devbyteai commented Dec 25, 2025

Summary

Relax numpy version constraint from >=1.24.0,<1.26.0 to >=1.24.0,<2.0.0
Enables installation on Python 3.12 and 3.13

Problem

Fixes #77, #104, #231, #240, #243, #272, #319, #322, #323, #390

The numpy<1.26.0 constraint prevented installation on Python 3.12+ because numpy 1.24.x/1.25.x cannot be built from source (pkgutil.ImpImporter was removed in Python 3.12, and distutils was removed from stdlib).

Solution

Changed to >=1.24.0,<2.0.0 to allow prebuilt numpy wheels for Python 3.12/3.13 while maintaining numpy 1.x API compatibility.

Test

Verified with pip install -e . on Python 3.12:

  • Installs numpy 1.26.4
  • All imports work correctly

Relax numpy version constraint from >=1.24.0,<1.26.0 to >=1.24.0,<2.0.0
Enables installation on Python 3.12 and 3.13

Problem
-------
Fixes resemble-ai#77, resemble-ai#104, resemble-ai#231, resemble-ai#240, resemble-ai#243, resemble-ai#272, resemble-ai#319, resemble-ai#322, resemble-ai#323, resemble-ai#390

The numpy<1.26.0 constraint prevented installation on Python 3.12+ because
numpy 1.24.x/1.25.x cannot be built from source (pkgutil.ImpImporter was
removed in Python 3.12, and distutils was removed from stdlib).

Solution
--------
Changed to >=1.24.0,<2.0.0 to allow prebuilt numpy wheels for Python 3.12/3.13
while maintaining numpy 1.x API compatibility.

Test
----
Verified with pip install -e . on Python 3.12 - installs numpy 1.26.4 and
imports work correctly.
@devbyteai devbyteai force-pushed the fix/python312-numpy-compatibility branch from 765a333 to 68d83fb Compare December 25, 2025 20:00
@akx
Copy link

akx commented Jan 5, 2026

Numpy 2.3.5 works fine too, btw. (2.4 doesn't due to numba requirements.)

@Vectorial1024
Copy link

Seeing the upper bound is relaxed to <2.0.0, it seems ~=1.24 is simpler, since this should be exactly equivalent to >=1.24.0,<2.0.0.

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.

I cannot get it to install on Mac, I keep getting conflicts.

3 participants