簡體   English   中英

無法使用網狀在 Rmarkdown 中導入已安裝的 python 模塊

[英]Unable to import installed python modules in Rmarkdown with reticulate

我剛剛安裝了 R package 'reticulate',我發現它特別有用。 但是有一個缺點,我需要重新安裝我已經安裝的 python 模塊(即熊貓)。 python 引擎是 miniconda,默認情況下是 evnv。 如何指定 python 解釋器,這樣我就不需要重新安裝所有已安裝的模塊? (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.可執行程序

任何想法?

你看過 這個頁面嗎,你必須指定你想要的 Python 引擎,在這種情況下是 miniconda,但只需要使用use_python function 告訴 Rmarkdown 它在你的計算機上的位置。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM