pip install torch killed at 99% -- Excessive memory usage
This is while I was installing torch on my laptop. It was getting killed continuously so I thought I will check the memory usage. It hanged my laptop, I had to take a picture with my phone.

If you can't see the image below, it shows pip using 5.8 GiB memory out of 7.8 GiB available. That was a sudden spike at 99%.

System Monitor pip memory usage

If you are running low on memory you could try with pip install package --no-cache-dir
