Current sympy release has a known issue (https://github.com/sympy/sympy/issues/27151) that impacts STMint. This should be fixed in the next release (https://github.com/sympy/sympy/pull/27153). Once the fix is released, should remove the sympy version restriction.