Issue 1:
Currently:

scipy/setup.py

Line 542
in
f34de3a

np_minversion = '1.17.3'

But one can still do the following (say, in Python 3.9.7):

pip install "numpy==1.18.5"
pip install "scipy==1.7.3" # Does not attempt to upgrade numpy

and then encounter this error:

>>> from scipy import signal

...\scipy\signal\__init__.py in <module>
308 from .spectral import *
309 from .wavelets import *
--> 310 from ._peak_finding import *
311 from .windows import get_window # keep this one in signal namespace
312

...\scipy\signal\_peak_finding.py in <modul
e>
6
7 from scipy.signal.wavelets import cwt, ricker
----> 8 from scipy.stats import scoreatpercentile
9
10 from ._peak_finding_utils import (

...\scipy\stats\__init__.py in <module>
439 """
440
--> 441 from .stats import *
442 from .distributions import *
443 from .morestats import *

...\scipy\stats\stats.py in <module>
41 import scipy.special as special
42 from scipy import linalg
---> 43 from . import distributions
44 from . import mstats_basic
45 from ._stats_mstats_common import (_find_repeats, linregress, theilslope
s,

...\scipy\stats\distributions.py in <module
>
9
10 from . import _continuous_distns
---> 11 from . import _discrete_distns
12
13 from ._continuous_distns import *

...\scipy\stats\_discrete_distns.py in <mod
ule>
17 _check_shape)
18 import scipy.stats._boost as _boost
---> 19 from .biasedurn import (_PyFishersNCHypergeometric,
20 _PyWalleniusNCHypergeometric,
21 _PyStochasticLib3)

biasedurn.pyx in init scipy.stats.biasedurn()

ModuleNotFoundError: No module named 'numpy.random.bit_generator'

Workaround: Manually upgrade numpy.

ref: https://numpy.org/doc/stable/release/1.19.0-notes.html#numpy-random-bit-generator-moved-to-numpy-random-bit-generator

cc @duytnguyendtn

Issue 2:
I'm using the NLU framework Rasa using TensorFlow which is relying on scipy. I have no issues running the code on a amd64 platform, but I'm using a Raspberry Pi 4 aarch64 architecture, where I hit the problem:

ModuleNotFoundError: No module named 'numpy.random.bit_generator'

I thought recompiling everything would fix this issue with:

pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2 --no-cache-dir --no-binary :all:

but I get the same error.

I cannot update at least numpy, because version 1.19 is introducing some breaking changes and TensorFlow does not work anymore.

Reproducing code example:

The problem can be also reproduced by executing in a Python 3 shell:

mkdir test
cd test
python3 -m venv venv
source venv/bin/activate
pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2
python3

Within the Python 3 shell execute:

import scipy.stats

Error message:

>>> import scipy.stats
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/__init__.py", line 441, in <module>
from .stats import *
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/stats.py", line 43, in <module>
from . import distributions
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/distributions.py", line 11, in <module>
from . import _discrete_distns
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/_discrete_distns.py", line 19, in <module>
from .biasedurn import (_PyFishersNCHypergeometric,
File "biasedurn.pyx", line 1, in init scipy.stats.biasedurn
ModuleNotFoundError: No module named 'numpy.random.bit_generator'

Scipy/Numpy/Python version information:

1.7.1 1.18.5 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)