ptrblck:

libshm.so


maybe try looking for any places that this may exist:

sudo find / -name “libshm.so”

and delete any folders with torch.
Another option is to create a virtual env with conda. It works well. Here 17 is a good guide. But basically, it’s three commands (after installing conda of course) - assuming you wanted python 3.6 and cuda 8:

conda create -n pytorch python=3.6
source activate pytorch
conda install pytorch torchvision cuda80 -c pytorch

and b/c it’s a virtual env it should not care about previous installations (in theory of course )