如何解决;未找到Python共享库,未加载Python绑定。”;在R中导入Python3包时?
我想在我的R代码中导入某个库。在此过程中,我研究了某些链接,发现将使用以下代码段:如何解决;未找到Python共享库,未加载Python绑定。”;在R中导入Python3包时?,python,r,python-3.x,virtualenv,pyenv,Python,R,Python 3.x,Virtualenv,Pyenv,我想在我的R代码中导入某个库。在此过程中,我研究了某些链接,发现将使用以下代码段: library("reticulate") use_python("/Users/aviral.s/.pyenv/versions/3.5.2/envs/may21/bin/python3") source_python("athena/core/operation/jupyter_notebook.py") 如您所见,我使用的是virtualenv->may21。但是,由于出现错误,我无法导入上述文件的函数:
library("reticulate")
use_python("/Users/aviral.s/.pyenv/versions/3.5.2/envs/may21/bin/python3")
source_python("athena/core/operation/jupyter_notebook.py")
如您所见,我使用的是virtualenv
->may21
。但是,由于出现错误,我无法导入上述文件的函数:
Error in initialize_python(required_module, use_environment) :
Python shared library not found, Python bindings not loaded.
我尝试了另一个APIuse\u virtualenv(“may21”)
,但没有成功。我也读了问题,但并没有回答
我执行上述操作的完整代码为:
> library("reticulate")
> use_python("/Users/aviral.s/.pyenv/versions/3.5.2/envs/may21/bin/python3")
> source_python("athena/core/operation/jupyter_notebook.py")
Error in initialize_python(required_module, use_environment) :
Python shared library not found, Python bindings not loaded.
> use_virtualenv("may21")
> source_python("athena/core/operation/jupyter_notebook.py")
Error in initialize_python(required_module, use_environment) :
Python shared library not found, Python bindings not loaded.
我希望能够使用我的库中的python3api。仅供参考,我已经能够在当前virtualenv的Python3 shell中导入相同的内容