Closed
Description
Running
import scipy.stats as stats
gives the following error:
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-38-x86_64-linux-gnu.so)
It might be a path issue. The created miniconda enviroment by reticulate is sound.
And the included libstdc++.so.6
in the miniconda enviroment does contain the GLIBCXX_3_4.30 string.
/home/handboek/.local/share/r-miniconda/envs/r-reticulate/bin/python
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy.stats as stats
>>>
reproduction:
> library("reticulate")
> install_miniconda()
< snip>
> py_discover_config()
python: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/bin/python
libpython: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.8.so
pythonhome: /home/handboek/.local/share/r-miniconda/envs/r-reticulate:/home/handboek/.local/share/r-miniconda/envs/r-reticulate
version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
numpy: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/numpy
numpy_version: 1.23.3
> pad <- py_discover_config()
> use_python(pad$python)
> py_install("scipy")
+ '/home/handboek/.local/share/r-miniconda/bin/conda' 'install' '--yes' '--prefix' '/home/handboek/.local/share/r-miniconda/envs/r-reticulate' '-c' 'conda-forge' 'scipy'
Collecting package metadata (current_repodata.json): done
Solving environment: done
<snip>
Downloading and Extracting Packages
scipy-1.9.1 | 26.2 MB | ################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
> repl_python()
Python 3.8.13 (/home/handboek/.local/share/r-miniconda/envs/r-reticulate/bin/python)
Reticulate 1.26 REPL -- A Python interpreter in R.
Enter 'exit' or 'quit' to exit the REPL and return to R.
>>> import scipy.stats as stats
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-38-x86_64-linux-gnu.so)
>>> exit
environment
> utils::sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 11 (bullseye)
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reticulate_1.26
loaded via a namespace (and not attached):
[1] compiler_4.2.1 here_1.0.1 Matrix_1.5-1 rprojroot_2.0.3
[5] rappdirs_0.3.3 Rcpp_1.0.9 grid_4.2.1 jsonlite_1.8.0
[9] png_0.1-7 lattice_0.20-45
> reticulate::py_config()
python: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/bin/python
libpython: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.8.so
pythonhome: /home/handboek/.local/share/r-miniconda/envs/r-reticulate:/home/handboek/.local/share/r-miniconda/envs/r-reticulate
version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
numpy: /home/handboek/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/numpy
numpy_version: 1.23.3
sys: [builtin module]
NOTE: Python version was forced by use_python function