I’m using PyCall with python from my anaconda installation, i.e. ENV["PYTHON"] = "/home/aplavin/anaconda3/bin/python"
. Almost everything has been working fine, but I’m unable to load xgboost
package: pyimport("xgboost")
throws
ERROR: PyError (PyImport_ImportModule) <class 'xgboost.core.XGBoostError'>
XGBoostError('XGBoost Library (libxgboost.so) could not be loaded.\nLikely causes:\n * OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, libgomp.so for UNIX-like OSes)\n * You are running 32-bit Python on a 64-bit OS\nError message(s): ["/home/aplavin/julia-1.2.0/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26\' not found (required by /home/aplavin/anaconda3/lib/python3.7/site-packages/xgboost/./lib/libxgboost.so)"]\n')
File "/home/aplavin/anaconda3/lib/python3.7/site-packages/xgboost/__init__.py", line 11, in <module>
from .core import DMatrix, Booster
File "/home/aplavin/anaconda3/lib/python3.7/site-packages/xgboost/core.py", line 161, in <module>
_LIB = _load_lib()
File "/home/aplavin/anaconda3/lib/python3.7/site-packages/xgboost/core.py", line 152, in _load_lib
'Error message(s): {}\n'.format(os_error_list))
As I understand, it requires GLIBCXX_3.4.26 while Julia has another version which it tries to use here. Of course, everything works fine when I do import xgboost
from plain Python REPL, because it uses the library from conda (I suppose) which has the matching version. I tried playing with ld_library_path and other environment variables, but no success.
So, the question is - how do I use the installed python package through PyCall, providing it with the correct libstdc++?