On Wed, Nov 17, 2021 at 5:17 PM Olivier Grisel <olivier.grisel@ensta.org> wrote:
After some investigations in https://github.com/scipy/scipy/issues/15050, we can confirm that the problem is indeed very similar.

I think that for scipy 1.7.3 we can do a stopgap workaround that sets the `OPENBLAS_THREAD_TIMEOUT` env variable to `"1"` in `_distributor_init.py` but only for the macos/arm64 wheel.

That does sound like the right plan to me, thanks for finding this workaround Olivier!

And then we can discuss if we want to generalize this to numpy and scipy wheels for later major releases and try to tackle a cleaner approach that would avoid duplicated linking of threaded libraries in the scipy stack one way or another.

That would require quite a bit of design and thinking indeed - it needs doing, but agreed that that's for later. It's inherently problematic with the PyPI model, and there's multiple options for solving it. We also should have a look at our stances on OpenMP - SciPy forbids using it, while scikit-learn is starting to use it more.

Cheers,
Ralf