I am using the Azure ML Notebook with R
kernel and reticulate
package is installed with version 1.25
. When I run the following code:
library(reticulate)
Sys.which("python")
It gives the output as python: '/usr/bin/python'
and so, I have used use_python("/usr/bin/python")
but while using the py_config()
, it gives me the following error:
Error in py_initialize(config$python, config$libpython, config$pythonhome, : PyException_SetTraceback - /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so: undefined symbol: PyException_SetTraceback
Traceback:
1. py_config()
2. ensure_python_initialized()
3. initialize_python(required_module, use_environment)
4. tryCatch({
. oldpythonpath <- Sys.getenv("PYTHONPATH")
. newpythonpath <- Sys.getenv("RETICULATE_PYTHONPATH", unset = paste(config$pythonpath,
. system.file("python", package = "reticulate"), sep = .Platform$path.sep))
. local({
. Sys.setenv(PYTHONPATH = newpythonpath)
. on.exit(Sys.setenv(PYTHONPATH = oldpythonpath), add = TRUE)
. py_initialize(config$python, config$libpython, config$pythonhome,
. config$virtualenv_activate, config$version >= "3.0",
. interactive(), numpy_load_error)
. })
. }, error = function(e) {
. Sys.setenv(PATH = oldpath)
. if (is.na(curr_session_env)) {
. Sys.unsetenv("R_SESSION_INITIALIZED")
. }
. else {
. Sys.setenv(R_SESSION_INITIALIZED = curr_session_env)
. }
. stop(e)
. })
5. tryCatchList(expr, classes, parentenv, handlers)
6. tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. value[[3L]](cond)
Can anyone please help me to resolve this error. Any help would be appreciated.