<p dir="auto">Currently:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/scipy/scipy/blob/f34de3a87010bebf6cc1e9474dc58d315d75f52d/setup.py#L542">scipy/setup.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 542
      in
      <a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/f34de3a87010bebf6cc1e9474dc58d315d75f52d">f34de3a</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L542" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="542"></td>
          <td id="LC542" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">np_minversion</span> <span class="pl-c1">=</span> <span class="pl-s">'1.17.3'</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">But one can still do the following (say, in Python 3.9.7):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install &quot;numpy==1.18.5&quot;
pip install &quot;scipy==1.7.3&quot;  # Does not attempt to upgrade numpy"><pre class="notranslate"><code class="notranslate">pip install "numpy==1.18.5"
pip install "scipy==1.7.3"  # Does not attempt to upgrade numpy
</code></pre></div>
<p dir="auto">and then encounter this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from scipy import signal

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

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

...\scipy\stats\__init__.py in &lt;module&gt;
    439 &quot;&quot;&quot;
    440
--&gt; 441 from .stats import *
    442 from .distributions import *
    443 from .morestats import *

...\scipy\stats\stats.py in &lt;module&gt;
     41 import scipy.special as special
     42 from scipy import linalg
---&gt; 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 &lt;module
&gt;
      9
     10 from . import _continuous_distns
---&gt; 11 from . import _discrete_distns
     12
     13 from ._continuous_distns import *

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

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

ModuleNotFoundError: No module named 'numpy.random.bit_generator'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; from scipy import signal

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

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

...\scipy\stats\__init__.py in &lt;module&gt;
    439 """
    440
--&gt; 441 from .stats import *
    442 from .distributions import *
    443 from .morestats import *

...\scipy\stats\stats.py in &lt;module&gt;
     41 import scipy.special as special
     42 from scipy import linalg
---&gt; 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 &lt;module
&gt;
      9
     10 from . import _continuous_distns
---&gt; 11 from . import _discrete_distns
     12
     13 from ._continuous_distns import *

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

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

ModuleNotFoundError: No module named 'numpy.random.bit_generator'
</code></pre></div>
<p dir="auto">Workaround: Manually upgrade numpy.</p>
<p dir="auto">ref: <a href="https://numpy.org/doc/stable/release/1.19.0-notes.html#numpy-random-bit-generator-moved-to-numpy-random-bit-generator" rel="nofollow">https://numpy.org/doc/stable/release/1.19.0-notes.html#numpy-random-bit-generator-moved-to-numpy-random-bit-generator</a></p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/duytnguyendtn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/duytnguyendtn">@duytnguyendtn</a></p>
<p dir="auto">I'm using the NLU framework <a href="https://rasa.com" rel="nofollow">Rasa</a> 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:</p>
<blockquote>
<p dir="auto">ModuleNotFoundError: No module named 'numpy.random.bit_generator'</p>
</blockquote>
<p dir="auto">I thought recompiling everything would fix this issue with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2 --no-cache-dir --no-binary :all:"><pre class="notranslate"><code class="notranslate">pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2 --no-cache-dir --no-binary :all:
</code></pre></div>
<p dir="auto">but I get the same error.</p>
<p dir="auto">I cannot update at least numpy, because version 1.19 is introducing some breaking changes and TensorFlow does not work anymore.</p>
<h4 dir="auto">Reproducing code example:</h4>
<p dir="auto">The problem can be also reproduced by executing in a Python 3 shell:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="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"><pre class="notranslate">mkdir <span class="pl-c1">test</span>
<span class="pl-c1">cd</span> <span class="pl-c1">test</span>
python3 -m venv venv
<span class="pl-c1">source</span> venv/bin/activate
pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2
python3</pre></div>
<p dir="auto">Within the Python 3 shell execute:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scipy.stats"><pre class="notranslate"><code class="notranslate">import scipy.stats
</code></pre></div>
<h4 dir="auto">Error message:</h4>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import scipy.stats
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/__init__.py&quot;, line 441, in &lt;module&gt;
    from .stats import *
  File &quot;/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/stats.py&quot;, line 43, in &lt;module&gt;
    from . import distributions
  File &quot;/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/distributions.py&quot;, line 11, in &lt;module&gt;
    from . import _discrete_distns
  File &quot;/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/_discrete_distns.py&quot;, line 19, in &lt;module&gt;
    from .biasedurn import (_PyFishersNCHypergeometric,
  File &quot;biasedurn.pyx&quot;, line 1, in init scipy.stats.biasedurn
ModuleNotFoundError: No module named 'numpy.random.bit_generator'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import scipy.stats
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/__init__.py", line 441, in &lt;module&gt;
    from .stats import *
  File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/stats.py", line 43, in &lt;module&gt;
    from . import distributions
  File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/distributions.py", line 11, in &lt;module&gt;
    from . import _discrete_distns
  File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/_discrete_distns.py", line 19, in &lt;module&gt;
    from .biasedurn import (_PyFishersNCHypergeometric,
  File "biasedurn.pyx", line 1, in init scipy.stats.biasedurn
ModuleNotFoundError: No module named 'numpy.random.bit_generator'
</code></pre></div>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.7.1 1.18.5 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.7.1 1.18.5 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
</code></pre></div>