title: python in rmarkdown (reticulate)
body: <p>I am trying to add a python chunk in a rmarkdown document. I installed package reticulate then here is my document:</p>
  
  <pre><code>```{r, message=FALSE, warning=FALSE, echo = FALSE}
    library(reticulate)
  ```
  
  ```{python, echo = FALSE, eval = FALSE}
  a=1
  a
  #import numpy as np
  #import matplotlib.pyplot as plt
  
  ## evenly sampled time at 200ms intervals
  #t = np.arange(0., 5., 0.2)
  
  ## red dashes, blue squares and green triangles
  #plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
  #plt.show()
  ```
  </code></pre>
  
  <p>However I get this error when knitting the document: (note that the error happens when running the second chunk)</p>
  
  <pre><code>label: unnamed-chunk-1 (with options) 
  List of 3
   $ message: logi FALSE
   $ warning: logi FALSE
   $ echo   : logi FALSE
  
  
    |                                                                       
    |....                                                             |   6%
    ordinary text without R code
  
  
    |                                                                       
    |......                                                           |   9%
  label: unnamed-chunk-2 (with options) 
  List of 3
   $ echo  : logi FALSE
   $ eval  : logi FALSE
   $ engine: chr "python"
  
  Error in py_module_import(module, convert = convert) : 
    ModuleNotFoundError: No module named 'rpytools'
  Calls: &lt;Anonymous&gt; ... remap_output_streams -&gt; import -&gt; py_module_import -&gt; .Call
  </code></pre>
  
  <p>Also adding that I did not find any information on this on <a href="https://github.com/rstudio/reticulate" rel="nofollow noreferrer">https://github.com/rstudio/reticulate</a>
  and
  <a href="https://rstudio.github.io/reticulate/articles/r_markdown.html" rel="nofollow noreferrer">https://rstudio.github.io/reticulate/articles/r_markdown.html</a></p>
  
  <p>I have knitr version 1.20, which is above 1.18 hence engine configuration should be automatic.</p>