Skip to content

Build failure: python312Packages.scipy #547063

Closed

Description

@marius851000

Nixpkgs version

  • Unstable (26.11)

Steps to reproduce

On an x86_64-linux machine:

  • checkout b8b853d42d9d5bd43af41804314987bc2c06b0b5
  • nix-build . -A python312Packages.scipy

Can Hydra reproduce this build failure?

Hydra doesn’t try to build the package.

It does try build CEPH, but it fail first due to another dependancy failing, and search for the full python312Packages.scipy timeout. python3.12-scipy return result that are from 25.11.

Link to Hydra build job

No response

Relevant log output

=========================== short test summary info ============================
FAILED lib/python3.12/site-packages/scipy/stats/tests/test_continuous.py::TestDistributions::test_support_moments_sample[Normal] - AssertionError:
Not equal to tolerance rtol=1e-07, atol=2e-09

Mismatched elements: 1 / 2 (50%)
Mismatch at index:
 [1]: 0.0 (ACTUAL), 2.0102755453969153e-09 (DESIRED)
Max absolute difference among violations: 2.01027555e-09
Max relative difference among violations: 1.
 ACTUAL: array([0., 0.])
 DESIRED: array([0.000000e+00, 2.010276e-09])
Falsifying example: test_support_moments_sample(
    self=<scipy.stats.tests.test_continuous.TestDistributions object at 0x7fffb7bec350>,
    family=scipy.stats._new_distributions.Normal,
    data=data(...),
    seed=271582488,
)
Draw 1: 0
Draw 2: BroadcastableShapes(input_shapes=((2,), ()), result_shape=(2,))
Draw 3: ()
Draw 4: ()
Draw 5: ()
Explanation:
    These lines were always and only run by failing examples:
        /nix/store/k4mnva74d3kq0c56dwc8yi3m65ws9phq-python3.12-numpy-2.5.1/lib/python3.12/site-packages/numpy/_core/arrayprint.py:1021
        /nix/store/k4mnva74d3kq0c56dwc8yi3m65ws9phq-python3.12-numpy-2.5.1/lib/python3.12/site-packages/numpy/_core/arrayprint.py:1022
        /nix/store/k4mnva74d3kq0c56dwc8yi3m65ws9phq-python3.12-numpy-2.5.1/lib/python3.12/site-packages/numpy/_core/arrayprint.py:1027
        /nix/store/k4mnva74d3kq0c56dwc8yi3m65ws9phq-python3.12-numpy-2.5.1/lib/python3.12/site-packages/numpy/_core/arrayprint.py:1028
        /nix/store/k4mnva74d3kq0c56dwc8yi3m65ws9phq-python3.12-numpy-2.5.1/lib/python3.12/site-packages/numpy/_core/arrayprint.py:1033
        (and 12 more with settings.verbosity >= verbose)

You can reproduce this example by temporarily adding @reproduce_failure('6.156.1', b'AXiccxEwYJVwZHBkcmRkdGRgALIYEIgBADT4Au8=') as a decorator on your test case
= 1 failed, 87693 passed, 8371 skipped, 300 xfailed, 22 xpassed, 746 warnings in 104.91s (0:01:44) =

Additional context

A dependancy of ceph.

Failure is reproductible across builds. This only impact the python312 version. python313Packages.scipy compile properly. I suspect that either the RNG used in the test, or the RNG used to generate seed, differ across python version.

Adding a substituteInPlace scipy/stats/tests/test_continuous.py --replace-fail "rng = np.random.default_rng(seed)" "rng = np.random.default_rng(1000)" make the package build.

I would suggest disabling the test, but I don’t have time for that right now.

In addition, the failed case is less than 0.6% above the tolerance margin.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 7.0.10, NixOS, 26.11 (Zokor), 26.11.20260525.f9d8b65
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.7
  • channels(root): "nixos-25.05"
  • nixpkgs: /nix/store/0iprnlsgyf6kv98rvfjpxr60xqn42hsw-source

Notify maintainers

@doronbehar


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. changed the title [-]Build failure: python312.scipy[/-] [+]Build failure: python312Packages.scipy[/+] on Jul 29, 2026
  2. benaryorg commented on Jul 30, 2026

    @benaryorg
    Contributor

    Is this a duplicate of #533557?
    Does #533691 change anything about the build failure?

  3. doronbehar commented on Jul 30, 2026

    @doronbehar
    Contributor

    Is this a duplicate of #533557?

    I don't think so, that issue refers to different tests that fail, and on different build platform and Scipy version.

    Does #533691 change anything about the build failure?

    This PR has reached branch master, and indeed now I notice that this issue refers to Nixpkgs at 26.11.20260525.f9d8b65 which is f9d8b65 , and at that commit scipy is at 1.17.1 . However, I just checked on current master - 579fa02 and python312Packages.scipy test suite fails too with the exact same failure as reported here. Let's continue with #547098 .

  4. jaredmontoya commented on Aug 2, 2026

    @jaredmontoya
    Contributor

    As this package has 764 packages that indirectly depend on it here is a temporary overlay fix for anyone reading this:

    pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
        (
          _: pythonPrev:
          prev.lib.optionalAttrs pythonPrev.python.isPy312 {
            scipy = pythonPrev.scipy.overrideAttrs (old: {
              disabledTests = old.disabledTests ++ [ "test_support_moments_sample" ];
            });
          }
        )
      ];
  5. SuperSandro2000 commented on Aug 5, 2026

    @SuperSandro2000
    Member

    What packages due truly depend on such an old Python version? I'd rather fix those and review fixes for them.

  6. jaredmontoya commented on Aug 5, 2026

    @jaredmontoya
    Contributor

    In my case it was something outside nixpkgs, I followed your advice and migrated it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions