[Solved] RuntimeError : PyTorch was compiled without NumPy support

I used to use torch 0.4.1, numpy 1.20.1, running error pytorch was compiled without numpy support

later found the following solution
1

pip install numpy==1.15.0

2.upgrade torch-0.4.1to torch-0.4.1.post2

pip install torch==0.4.1.post2

Another error will be reported after using 1 (I forgot the screenshot), which is like this: valueerror: numpy.ufunc size changed, may indicate binary instability. Expected 216 from C header, got 192 from pyobject
after that, I changed the version of numpy to 1.20.1 , Then update torch from torch-0.4.1 to torch-0.4.1. Post2 , so the first step is unnecessary

Read More: