I'm having an issue with reticulate that only manifests in RStudio Server (1.1.456) on CentOS 7.5, running R version 3.5.1. In the example below, there's a failure to load pandas 0.23, stemming from a failure to find the right version of GCC.
Oddly enough, since Anaconda 3 comes with the necessary binaries, this works fine when running this code through an interactive R session at the command prompt, as well as using a local install of RStudio, but is only problematic on RStudio Server.
PATH and LD_LIBRARY_PATH variables are configured the same in both cases (i.e. /etc/environment matches /usr/lib64/R/etc/Renviron.site). Given that I've had other similar issues with compiled applications inside RStudio Server (e.g. Axioma's Java API), there seems to be something special about the RStudio Server environment, but I'm completely baffled as to what that might be.
library(reticulate)
pd <- import('pandas')
Error in py_module_import(module, convert = convert) :
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /opt/anaconda3/lib/python3.6/site-packages/pandas/_libs/window.cpython-36m-x86_64-linux-gnu.so)
If we downgrade to pandas 0.22 this works, but we then have similar issues with other packages, so it's been a game of whack-a-mole. I was tempted to link the required CentOS system binaries to the versions in /anaconda/lib, but tinkering with core libraries tends to be a bit perilous.
Any help would be greatly appreciated!