Hi,
New to both knitting, reticulate, and python.
I am trying to html knit a "hello world" code chunk with reticulate R, but without success.
The (green) "Run Current Chunk" button works fine within the .Rmd project.
Yet, the knitting process halts on my reticulate::source_python() call.
The R Markdown console output tab halts stating "label: unnamed-chunk-1" (at 67%).
Using mac os catalina (10.15.7), anaconda for mac (Navigator 1.9.12), and having the latest rstudio/reticulate installed via remotes::install_github("rstudio/reticulate"). I am not using miniconda, only using the base default environment in anaconda.
Below is the code in .Rmd file called test.Rmd;
---
title: "R Notebook"
output:
html_document: default
---
```{r}
library('reticulate')
library("knitr")
use_python("/Users/pept/opt/anaconda3/bin/python")
use_condaenv('base', conda = "/Users/pept/opt/anaconda3/bin/conda")
#use_virtualenv("r-reticulate")
#reticulate::py_config()
#reticulate::py_discover_config()
reticulate::source_python("~/Desktop/test.py")
#reticulate::source_python("test.py")
#print(py$add(2,3))
Below is the code is the Python "hello world" source script called test.py;
def add(x,y):
return x + y
Any help or assistance would be very much appreciated.
Thanks.