Re: [R] Problem to run python code in r markdown

2023-01-20 Thread avi.e.gross
lled somewhere on your machine. When you get things aligned, you will be fine. -Original Message- From: R-help On Behalf Of Kai Yang via R-help Sent: Friday, January 20, 2023 11:20 AM To: R-help Mailing List Subject: [R] Problem to run python code in r markdown Hi Team,I'm

Re: [R] Problem to run python code in r markdown

2023-01-20 Thread Milan Glacier
Maybe it is the order. You called py_install() first and then called use_condaenv(). Perhaps you need to switch to your conda env first and then call py_install(). On 01/20/23 16:20, Kai Yang via R-help wrote: Hi Team,I'm trying to run python in R markdown (flexdashboard). The code is below: t

Re: [R] Problem to run python code in r markdown

2023-01-20 Thread Eric Berger
You don't specify what platform you are on (linux / Windows / other), and what tools you are using. I am running a linux system and I have virtual environments set up. I set the environment variable RETICULATE_PYTHON to point to python (in my virtual environment). I am using RStudio, and I use the

[R] Problem to run python code in r markdown

2023-01-20 Thread Kai Yang via R-help
Hi Team,I'm trying to run python in R markdown (flexdashboard). The code is below: try Python= ```{r, include=FALSE, echo=TRUE}library(reticulate)py_install("numpy") use_condaenv("base") ``` ```{python}import numpy as np``` I got error message below: Error in py_call_impl(callable, d