scipy: Raspberry Pi 4 aarch64: ModuleNotFoundError: No module named 'numpy.random.bit_generator'
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)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (16 by maintainers)
What a mess. The attitude of the TensorFlow maintainers is that it’s just not important for them. Both the bug and the unwillingness to fix it are 100% on their side.
Good point Tirth. If one waits long enough, some problems fix themselves:)
In this case, let’s close it when we drop numpy
1.18.x
support, which we can do for the next release. No need to backport to1.8.1
anymore I’d say.