I want to import a certain library in my R code. While doing so, I studied certain links and found out that the following snippet is to be used:
library("reticulate")
use_python("/Users/aviral.s/.pyenv/versions/3.5.2/envs/may21/bin/python3")
source_python("athena/core/operation/jupyter_notebook.py")
As you can see, I am using a virtualenv
-> may21
. However, I am unable to import the above file's functions as I get an error:
Error in initialize_python(required_module, use_environment) :
Python shared library not found, Python bindings not loaded.
I tried another API use_virtualenv("may21")
but in vain. I also read this question but no response there.
My full code for performing the aforementioned action is:
> 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.
I expect to be able to use the Python3 APIs from my library. FYI, I have been able to import the same in the current virtualenv's Python3 shell.