from torch._C import * ImportError: numpy.core.multiarray failed to import

When installing pyTorch, follow the commands on the official website to install

pip3 install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl 
pip3 install torchvision

'import torch' will throw an error of "from torch._C import * ImportError: numpy.core.multiarray failed to import". The reason is that the numpy version does not match. It is best to upgrade to the latest version. The repair method is as follows:

pip install numpy -I
或者
pip3 install numpy -I

Rewarding is also a virtue

The bug has been cleared, or encourage me to continue creating!

Related Posts