[英]Reticulate not setting python path
I am trying to use reticulate in R. 我正在尝试在R中使用网状结构。
In bash I get: 用bash我得到:
which python
# ~/.pyenv/shims/python
But when I set it in RI never get it to work. 但是,当我在RI中设置它时,它永远无法正常工作。 Could someone help me understand why?
有人可以帮我理解为什么吗?
library(reticulate)
my_python='~/.pyenv/shims/python'
use_python(my_python, required = T) # throws no message
py_config() #throws error below
#Error in initialize_python(required_module, use_environment) :
# Python shared library not found, Python bindings not loaded.
Note that I made sure that ~/pyenv/shims/
is in $PATH
. 请注意,我确保
~/pyenv/shims/
在$PATH
。
Thanks a lot for the help in advance 非常感谢您的事先帮助
I faced the same problem, after a lot of searching I stumbled upon this. 经过大量搜索后,我偶然发现了这个问题。 Hopefully it will help: https://github.com/rstudio/reticulate/issues/291#issuecomment-437143751
希望它会有所帮助: https : //github.com/rstudio/reticulate/issues/291#issuecomment-437143751
From another poster in the same thread: "You need to use a version of Python built with the dynamically loadable library (.dylib). R can't link to a static Python library." 在同一线程的另一位发帖人中:“您需要使用由可动态加载的库(.dylib)构建的Python版本。R无法链接到静态Python库。”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.