Fix ModuleNotFoundError: No module named ‘numpy.testing.decorators’ – NumPy Tutorial

By | July 21, 2021

If you are running python script and get this error: ModuleNotFoundError: No module named ‘numpy.testing.decorators’. In this tutorial, we will introduce you how to fix this error.

Why does numpy.testing.decorators report error?

Because numpy.testing.decorators  is removed in numpy 1.18.0, which means we can use numpy 1.17.0 to fix this error.

How to fix this error?

We can install numpy 1.17.0 to fix.

Here is an example:

pip uninstall numpy
pip install numpy==1.17.0

Then we can find this error is fixed.

Leave a Reply