Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

python 3.11 not using conda lib path when load modules

未关闭
#673 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
linux, python

调研方向

使用 python3 -c 'import pandas;' 重现失败,并将其与使用 LD_LIBRARY_PATH 的命令进行比较,然后使用 ldd 和 readelf -d 检查报告中的 pandas 扩展和 Python 二进制文件。确定为什么没有选择 conda 环境的库路径;完成的标准是无需手动设置 LD_LIBRARY_PATH 即可导入 pandas,并且能够解析出预期的库。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
Shell
星标
47
派生
115
平均合并
5 天 11 小时
30 天内合并 PR
19

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

conda-forge/python-feedstock 的其他 Issue

查看 conda-forge/python-feedstock 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。