# Cannot import some python packages due to CLIBCXX version mismatch

**URL:** <https://discourse.julialang.org/t/cannot-import-some-python-packages-due-to-clibcxx-version-mismatch/30695>\
**Category:** New to Julia\
**Created:** [November 4, 2019, 1:34pm UTC](https://discourse.julialang.org/t/cannot-import-some-python-packages-due-to-clibcxx-version-mismatch/30695 "2019-11-04T13:34:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [November 4, 2019, 1:34pm UTC](https://discourse.julialang.org/t/cannot-import-some-python-packages-due-to-clibcxx-version-mismatch/30695/1 "2019-11-04T13:34:54Z")

</div>

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

```julia
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++?
