I've got a strange problem in python - code shows an error.
Numpy has an error?
“AttributeError: module 'numpy.random' has no attribute '_bit_generator'”
The above error indicates a function does not exist in the numpy library. This particular error is introduced in numpy 1.18.
To resolve this use any of these options:
RUN pip install "numpy>=1.19
pip install "numpy>=1.19"
Edit or create a file in your Files named: requirements.txt, add:
For more examples you can add scope to the versions min/max:
pip install "numpy>1.18, <=1.20" # Will install 1.20 unless some other requirements stop you from that.
pip install "numpy>1.18, <1.20" # Will install 1.19.X
When using < or > you must enclose the package and version in quotes for reliable operation since it can be interpreted as redirection symbol.
Please sign in to leave a comment.