title: name '_C' is not defined pytorch+jupyter notebook
body: <p>I have some code that uses pytorch, that runs fine from my IDE (pycharm).</p>
  
  <p>For research, I tried to run it from a jupyter notebook.</p>
  
  <p>The code in the notebook:</p>
  
  <pre><code>from algorithms import Argparser
  from algorithms import Session
  def main():
      print("main started")
      args = Argparser.parse()
      session = Session(args)
      session.run()
  </code></pre>
  
  <p>The package looks like:</p>
  
  <pre><code>|-algorithms
  |---__init__.py
  |---Argparser.py
  |---Session.py
  |---&lt;many more files that are being used by Session&gt;.py
  </code></pre>
  
  <p>some of those files do <code>import torch</code></p>
  
  <p>When running the code in the notebook, I get</p>
  
  <blockquote>
    <p>NameError                                 Traceback (most recent call
    last)  in 
          1 from algorithms import Argparser
    ----> 2 from algorithms import Session
          3 def main():
          4     print("main started")
          5     args = Argparser.parse()</p>
    
    <p>D:\git\stav\stav-rl\algorithms\Session.py in 
         12 
         13 
    ---> 14 from algorithms.Episode import Episode
         15 from algorithms.Agent import Agent
         16 import torch</p>
    
    <p>D:\git\stav\stav-rl\algorithms\Episode.py in 
          1 <strong>author</strong> = 'Noam'
          2 
    ----> 3 import torch
          4 import numpy as np
          5 import cv2</p>
    
    <p>c:\anaconda3\envs\threadartrl\lib\site-packages\torch__init__.py in
    
         84 from torch._C import *
         85 
    ---> 86 <strong>all</strong> += [name for name in dir(<em>C)
         87             if name[0] != '</em>' and
         88             not name.endswith('Base')]</p>
    
    <p>NameError: name '_C' is not defined</p>
  </blockquote>
  
  <p>The error is on <code>from algorithms import Session--&gt;...--&gt;import torch</code></p>
  
  <p>How can i get the code to run?</p>