简体   繁体   中英

Unable to import installed python modules in Rmarkdown with reticulate

I just installed the R package 'reticulate' and I found it especially useful. But with one con that I need to re-install python module (ie pandas) I have already installed. The python engine is miniconda and the evnv is by default. How can I specify the python interpreter so that I dont need to re-install all the installed module? (After some search, I guess it has sth to do with 'virtualenv-tools ' in reticulate?) By the way, I used to execute python with pycharm and the interpreter is system interpreter located in c://python//python.exe

Any idea?

Have you looked at this page , you have to specify which Python engine you want, in this case miniconda, but just have to tell Rmarkdown where that is located on your computer using the use_python function.

```{r setup, include=FALSE}
library(reticulate)
use_python('/location/to/engine')
```

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM