I would like to run python in Rstudio markdown interactively. I use reticulate and could run python in the console but not from the markdown for some reason. It seems like once reticulate::repl_python() is run from the markdown, the chunk is shown running and never stop. I tried running reticulate::repl_python() from the console, but when I try to run the chunks they are all put on hold. Any thoughts on why this is the case? Below is the code I use. Thank you!
library(reticulate)
use_python("/app/python-3.7.2/bin/python3")
py_config()
py_install("pandas")
py_install("scanpy")
reticulate::repl_python()
import numpy as np
import pandas as pd