Raspberry Pi 4 aarch64: ModuleNotFoundError: No module named 'numpy.random.bit_generator'
See original GitHub issueI’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)
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (16 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named 'numpy.random ...
Running the following line, forced to reinstall the numpy package. Since the package was somehow corrupted, it was fixed.
Read more >No module named 'numpy.random.bit_generator' - Streamlit
I am trying to deploy a model but it keeps giving me an error warning ModuleNotFoundError: No module named 'numpy.random.bit_generator'.
Read more >No Module Named Github On Raspberry Pi - ADocLib
I have no issues running the code on a amd64 platform but I'm using a Raspberry Pi 4 aarch64: ModuleNotFoundError: No module named....
Read more >NUMPY LIBRARY CANNOT BE FOUND - Raspberry Pi Forums
"ModuleNotFoundError : No module named 'numpy'". ... I'm trying to execute a program in Python 3.7.4, which requires numpy library.
Read more >ModuleNotFoundError: No module named 'wxpython' Code Example
Answers related to “ModuleNotFoundError: No module named 'wxpython'” ... AttributeError: module 'numpy.random' has no attribute 'BitGenerator' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.