Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何解决;未找到Python共享库,未加载Python绑定。”;在R中导入Python3包时?_Python_R_Python 3.x_Virtualenv_Pyenv - Fatal编程技术网

如何解决;未找到Python共享库,未加载Python绑定。”;在R中导入Python3包时?

如何解决;未找到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。但是,由于出现错误,我无法导入上述文件的函数:

我想在我的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
。但是,由于出现错误,我无法导入上述文件的函数:

Error in initialize_python(required_module, use_environment) :
  Python shared library not found, Python bindings not loaded.
我尝试了另一个API
use\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中导入相同的内容