title: Loading pickle in R
body: <p>I am trying to load a pickle object in R, using the following process found online.</p>
  
  <p>First, I create a Python file called: "pickle_reader.py":</p>
  
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  def read_pickle_file(file):
      pickle_data = pd.read_pickle(file)
      return pickle_data
  </code></pre>
  
  <p>Then, I run the following R code:</p>
  
  <pre><code>install.packages('reticulate')
  
  require("reticulate")
  
  source_python("pickle_reader.py")
  pickle_data &lt;- read_pickle_file("pathname") 
  </code></pre>
  
  <p>but I get an error that says:</p>
  
  <pre><code>Error in py_run_file_impl(file, local, convert) : 
    ImportError: No module named pandas
  </code></pre>
  
  <p>N.B. I tried installing pandas again but this doesn't change the issue.</p>
  
  <p>Do you know how should I proceed?</p>
  
  <p>Thank you in advance</p>