简体   繁体   English

R reticulate 从 Github 安装 python 库

[英]R reticulate install python libraries from Github

Does anyone have any ideas on how to directly install the python libraries available on Github from reticulate ?有人对如何从reticulate直接安装 Github 上可用的 python 库有任何想法吗? The py_install function only supports libraries available on conda or PyPI . py_install函数仅支持condaPyPI上可用的库。

For example, when building an R package based on a python library only available on Github, do I inevitably have to copy the source code of the library into my package?例如,当基于仅在 Github 上可用的 python 库构建R包时,我是否不可避免地必须将库的源代码复制到我的包中?

Finally, in the function where I set up the python environment for the package, I called the R base<\/strong> system<\/code> function where I pass the install command.最后,在我为包设置 python 环境的函数中,我调用了R 基本<\/strong>system<\/code>函数,并在其中传递了 install 命令。

For example, for the pylearn-parsimony<\/strong> library which is not available on Conda, I used this line which worked:例如,对于 Conda 上不可用的pylearn-parsimony<\/strong>库,我使用了以下行:

system("pip install git+git://github.com/neurospin/pylearn-parsimony.git@master")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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