Edit 04/11/2021: This gist is quite old now. The current version of PyTorch is 1.8.1, which is miles ahead of version 1.0.1 that I was trying to install when I wrote this gist. Therefore some of the instructions may not apply, or some dependencies may have changed or bugs taken care of. I do not currently have a Raspberry Pi to verify unfortunately. Please proceed with caution. Further, there are may others who have shared their fixes, and direct links to their wheels down in the comments. Cheers !
sudo apt install libopenblas-dev libblas-dev m4 cmake cython python3-yaml libatlas-base-dev
- Stop the swap :
sudo dphys-swapfile swapoff
- Modify the size of the swap by editing as
root
the following file :/etc/dphys-swapfile
. Modify the valiableCONF_SWAPSIZE
and change its value toCONF_SWAPSIZE=2048