title: R reticulate importing module in second python file not working
body: <p>I am having problems with loading modules in a python script which I am calling via <code>reticulate</code>.</p>
  
  <p>My file-structure basically looks like this:</p>
  
  <pre><code>Rscript.R
  
  library(reticulate)
  py_run_file("python1.py")
  </code></pre>
  
  <pre><code>python1.py
  
  print("test1")
  import python2 as p2
  p2.run_test(123)
  </code></pre>
  
  <pre><code>python2.py
  
  def run_test(x):
      print("inside p2-run_test()")
      print(x)
  </code></pre>
  
  <p>Now if I am running <code>Rscript.R</code>, it works fine, but changing <code>python2.py</code> like this (adding a new function):</p>
  
  <pre><code>python2.py
  
  def run_test(x):
      print("inside p2-run_test()")
      print(x)
  
  def run_test2(x):
      print("inside p2-run_test2()")
      print(x)
  </code></pre>
  
  <p>and <code>python1.py</code> like this (calling said function):</p>
  
  <pre><code>python1.py
  
  print("test1")
  import python2 as p2
  p2.run_test2(123)
  </code></pre>
  
  <p>i get the following error:</p>
  
  <pre><code>test1
  Error in py_run_file_impl(file, local, convert) : 
    AttributeError: 'module' object has no attribute 'run_test2'
  </code></pre>
  
  <p>Can anybody help me here how I can fix this?</p>