网状未设置python路径

2024-04-26 07:56:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用R中的网状词

在bash中,我得到:

which python
# ~/.pyenv/shims/python

但是当我把它放在R里的时候,我从来没有让它工作过。有人能帮我理解为什么吗?你知道吗

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.

注意,我确保了~/pyenv/shims/$PATH中。你知道吗

非常感谢你的帮助


Tags: nopybashpyenvmessagewhichusemy