Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

python 3.11 not using conda lib path when load modules

Open
#673 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

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, python

Research direction

Reproduce the failure with python3 -c 'import pandas;' and compare it with the command using LD_LIBRARY_PATH, then inspect the reported pandas extension and Python binary with ldd and readelf -d. Determine why the conda environment library path is not selected; done means importing pandas works without manually setting LD_LIBRARY_PATH and the intended libraries are resolved.

Written by the indexing model from the issue text.

Description

bug
Solution to issue cannot be found in the documentation.
  • I checked the documentation.
Issue

python3 -c 'import pandas;' failed as "ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /share/home/uuu/micromamba/envs/n311/lib/python3.11/site-packages/pandas/_libs/window/aggregations.cpython-311-x86_64-linux-gnu.so)"

LD_LIBRARY_PATH=/share/home/uuu/micromamba/envs/n311/lib python3 -c 'import pandas;' works.

(n311) [uuu@c001 test]$ echo $LD_LIBRARY_PATH

(n311) [uuu@c001 test]$ ldd /share/home/uuu/micromamba/envs/n311/lib/python3.11/site-packages/pandas/_libs/window/aggregations.cpython-311-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007fff65a6d000)
        libstdc++.so.6 => /share/home/uuu/micromamba/envs/n311/lib/python3.11/site-packages/pandas/_libs/window/../../../../../libstdc++.so.6 (0x00007f77ec0d8000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f77ebd56000)
        libgcc_s.so.1 => /share/home/uuu/micromamba/envs/n311/lib/python3.11/site-packages/pandas/_libs/window/../../../../../libgcc_s.so.1 (0x00007f77ec469000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f77eb991000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f77eb789000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f77ec2bb000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f77eb569000)

$ readelf -d /share/home/uuu/micromamba/envs/n311/lib/python3.11/site-packages/pandas/_libs/window/aggregations.cpython-311-x86_64-linux-gnu.so

Dynamic section at offset 0x50778 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../../../../..]

$ readelf -d /share/home/uuu/micromamba/envs/n311/bin/python3

Dynamic section at offset 0x44a230 contains 34 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libutil.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib]

It seems rpath with $ORIGIN not working properly.

Installed packages
  python                                3.11.7           hab00c5b_1_cpython        conda-forge
  python_abi                            3.11             4_cp311                   conda-forge
  pandas                                2.0.3            py311h320fe9a_1           conda-forge
  libstdcxx-devel_linux-64              13.2.0           ha9c7c90_103              conda-forge
  libstdcxx-ng                          13.2.0           h7e041cc_3                conda-forge
  libsystemd0                           255              h3516f8a_0                conda-forge
  gcc                                   13.2.0           h574f8da_2                conda-forge
  gcc_impl_linux-64                     13.2.0           h338b0a0_3                conda-forge

... ...
Environment info
libmamba version : 1.5.5
     micromamba version : 1.5.5
           curl version : libcurl/8.5.0 OpenSSL/3.2.0 zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : /share/home/uuu/micromamba/envs
          package cache : /share/home/uuu/micromamba/pkgs
                          /share/home/uuu/.mamba/pkgs
            environment : n311 (active)
           env location : /share/home/uuu/micromamba/envs/n311
      user config files : /share/home/uuu/.mambarc
 populated config files : /share/home/uuu/.condarc
       virtual packages : __unix=0=0
                          __linux=4.18.0=0
                          __glibc=2.28=0
                          __archspec=1=x86_64-v4
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/nodefaults/linux-64
                          https://conda.anaconda.org/nodefaults/noarch
                          https://conda.anaconda.org/pytorch/linux-64
                          https://conda.anaconda.org/pytorch/noarch
                          https://conda.anaconda.org/nvidia/linux-64
                          https://conda.anaconda.org/nvidia/noarch
                          https://conda.anaconda.org/intel/linux-64
                          https://conda.anaconda.org/intel/noarch
       base environment : /share/home/uuu/micromamba
               platform : linux-64
Dominant language
Shell
Stars
47
Forks
114
Avg merge
1d 37m
Merged PRs (30d)
15

Getting set up

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 conda-forge/python-feedstock

All issues in conda-forge/python-feedstock

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.