title: I am getting error when importing torch and torch vision
body: <p>I installed torch and torchvision using pip3 on MAC. When I imported the same, getting the below error.</p>
  
  <p>Environment:</p>
  
  <pre><code>OS : macOS High Sierra
  Python : 3.7
  pip : 3
  Pytorch 1.1
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>import torch
  import torchvision
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>ImportError                               Traceback (most recent call
    last)  in 
          1 import numpy as np
          2 from glob import glob
    ----> 3 import torch
          4 import torchvision
          5 from torchvision import datasets</p>
    
    <p>/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/<strong>init</strong>.py
    in 
         77 del _dl_flags
         78 
    ---> 79 from torch._C import *
         80 
         81 <strong>all</strong> += [name for name in dir(_C)</p>
    
    <p>ImportError:
    dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so,
    9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib<br>
    Referenced from:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/lib/libshm.dylib
    Reason: image not found</p>
  </blockquote>
  
  <p>Any help on solving this error would be appreciated.</p>