Segmentation fault (Core dumped) on importing torch with python3.5 in virtualenv
I have installed torch=0.4.1 without cuda in a virtualenv. I am using python3.5 on ubuntu 16.04. Whenever I import torch in an interactive python shell, it quits the python program by showing Segmentation fault (core dumped). 


While, surprisingly I had earlier initialized a jupyter notebook and tried importing torch there and it was running fine. Can someone please help? I could not find a solution on official `PyTorch github' discussions.


I had the same issue, the solution was given on GitHub:

import cv2        # first import cv2
import torch

