Skip to content

Fix conda packaging: Python 3.14 ABI and version solver preference#76

Open
kmarchais wants to merge 4 commits intomasterfrom
fix/conda-python314-abi
Open

Fix conda packaging: Python 3.14 ABI and version solver preference#76
kmarchais wants to merge 4 commits intomasterfrom
fix/conda-python314-abi

Conversation

@kmarchais
Copy link
Member

@kmarchais kmarchais commented Feb 11, 2026

Problem

Closes #75

Two issues with the conda packages on Linux:

1. Python 3.14 free-threaded ABI (cp314t)

The simcoon conda package for linux-64 + Python 3.14 is built against the free-threaded Python variant (cp314t) instead of the standard variant (cp314). This makes it impossible to install simcoon alongside packages like matplotlib on Linux.

This is caused by a known conda-build bug where conda build on Linux incorrectly resolves python=3.14 to the free-threaded variant.

Platform simcoon py314 ABI Status
linux-64 python_abi 3.14.* *_cp314t Wrong (free-threaded)
osx-arm64 python_abi 3.14.* *_cp314 Correct (standard)
win-64 python_abi 3.14.* *_cp314 Correct (standard)

2. Solver prefers simcoon 1.9.6 over 1.10.1

When Python 3.13 is installed from the defaults channel and the user runs conda install -c conda-forge -c set3mah simcoon, the solver picks 1.9.6 instead of 1.10.1.

Root cause: conda-build's automatic run_exports from libblas/liblapack in the host environment bake a tight version constraint (libblas >=3.11.0,<4.0a0) into the package metadata. This forces the solver to pull in mkl-2025.3.0 from conda-forge (instead of the older mkl-2022.1.0 from defaults), which also requires superseding _openmp_mutex. The solver with flexible priority avoids this disruption by falling back to 1.9.6.

Then 1.9.6's boost >=1.84 dependency pulls in libboost/ICU, which conflicts with matplotlib's ICU requirements.

Fix

python_abi pin (commit 0b559f1)

host:
  - python_abi {{ python }} *_cp{{ python | replace(".", "") }}

Forces the standard CPython ABI for each Python version, avoiding the free-threaded variant.

ignore_run_exports (commit c228a7e)

build:
  ignore_run_exports:
    - libblas
    - liblapack
    - libcblas

Prevents the auto-generated version constraints from being added to the package metadata. The explicit run dependencies (libblas * *mkl, etc.) already correctly pin the BLAS backend — the BLAS/LAPACK C/Fortran ABI is stable across versions, so version pinning is unnecessary.

Test plan

  • Verify rendered metadata has no libblas/liblapack version constraints
  • Build locally and confirm index.json dependencies are correct
  • End-to-end test: conda create with Python 3.13 from defaults, install fixed simcoon -> solver picks 1.10.1 (not 1.9.6)
  • End-to-end test: conda install matplotlib succeeds after installing fixed simcoon
  • CI: rebuild conda packages on all platforms (linux-64, osx-arm64, win-64)
  • CI: verify coinstallation with matplotlib passes

Pin python_abi in host requirements to the standard CPython variant,
working around conda-build bug conda/conda-build#5843.
Pin python_abi in host requirements to the standard CPython variant,
working around conda-build bug conda/conda-build#5843.

Add CI test to verify simcoon + matplotlib coinstallation.
@kmarchais kmarchais force-pushed the fix/conda-python314-abi branch from 28448b0 to f4dab5c Compare February 11, 2026 13:07
The auto-generated run_exports from libblas/liblapack in host
(e.g. >=3.11.0,<4.0a0) forced the solver to use newer MKL from
conda-forge, making simcoon 1.10.x harder to install than 1.9.6
when Python was installed from the defaults channel.

By ignoring these run_exports, the explicit run dependencies
(libblas * *mkl, etc.) still correctly pin the BLAS backend
without unnecessarily constraining the version.
@kmarchais kmarchais changed the title Fix conda Python 3.14 package on Linux using wrong ABI variant Fix conda packaging: Python 3.14 ABI and version solver preference Feb 12, 2026
@kmarchais kmarchais requested a review from chemiskyy February 12, 2026 12:35
Copy link
Member

@chemiskyy chemiskyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python_abi pin is considered to be permanent or a temporary fix? If not, we should add a comment about it for a future removal

@kmarchais
Copy link
Member Author

The python_abi pin is considered to be permanent or a temporary fix? If not, we should add a comment about it for a future removal

If the linked conda-build issue is resolved in a future version, we could remove it. I added a comment next to this line to mention it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Compatibilité Simcoon et Matplotlib/Ipython avec Python 3.14

2 participants

Comments