import("pandas") error - version `GLIBCXX_3.4.21' not found

Open
#976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, pandas, python, r
Domain
tooling

Research direction

Start by reproducing the exact conda setup and import("pandas") call on CentOS 7. Read the rpytools/loader.py entry point shown in the traceback and inspect the reticulate paths involved in conda_create(), conda_install(), and use_condaenv(). Done means the reproducible example imports pandas without the GLIBCXX_3.4.21 error.

Written by the indexing model from the issue text.

Description

Reproducible example:

library(reticulate)
path_to_conda='~/bin/Software/miniconda3/bin/conda'
conda_create("test", conda=path_to_conda)
conda_install("test", c("pandas", "matplotlib"), conda=path_to_conda)

use_condaenv("test", required=TRUE, conda = path_to_conda)
import("pandas")

Error Message:

ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/user/bin/Software/miniconda3/envs/test/lib/python3.9/site-packages/pandas/_libs/window/aggregations.cpython-39-x86_64-linux-gnu.so)

Detailed traceback:
File "/home/user/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 19, in _import_hook
  module = _import(
File "/home/user/bin/Software/miniconda3/envs/test/lib/python3.9/site-packages/pandas/__init__.py", line 51, in <module>
  from pandas.core.api import (
File "/home/user/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 19, in _import_hook
  module = _import(
File "/home/user/bin/Software/miniconda3/envs/test/lib/python3.9/site-packages/pandas/core/api.py", line 31, in <module>
  from pandas.core.groupby import Grouper, NamedAgg
File "/home/user/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 19, in _import_hook

Session Info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /opt/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /opt/R-4.0.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] reticulate_1.18

loaded via a namespace (and not attached):
[1] compiler_4.0.3  Matrix_1.2-18   tools_4.0.3     rappdirs_0.3.1
[5] Rcpp_1.0.5      grid_4.0.3      jsonlite_1.7.1  lattice_0.20-41
Dominant language
R
Stars
1.8k
Forks
349
Avg merge
5h 13m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rstudio/reticulate

All issues in rstudio/reticulate

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.