添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
玩足球的风衣  ·  第829章 分配战利品·  2 月前    · 
活泼的石榴  ·  番外篇: ...·  5 月前    · 
开朗的咖啡  ·  编辑轴 - Tableau·  7 月前    · 
......
Traceback (most recent call last):
  File "/home/shizuku/code/python/pybind11/tests/test_cmake_build/subdirectory_function/../test.py", line 4, in <module>
    import test_cmake_build
ImportError: /home/shizuku/.conda/envs/py3.9/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/shizuku/code/python/pybind11/build/tests/test_cmake_build/subdirectory_function/test_cmake_build.cpython-39-x86_64-linux-gnu.so)
......

I run cmake_example got ERROR:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/shizuku/.conda/envs/py3.9/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/shizuku/.conda/envs/py3.9/lib/python3.9/site-packages/cmake_example.cpython-39-x86_64-linux-gnu.so)

my OS: Arch Linux
python: 3.9.7 (Miniconda)

@shizuku For anyone might got this error, a simple way to fix it is by copy or system libstdc++ to conda according folder.

in my case:

rm /home/xx/anaconda3/bin/../lib/libstdc++.so.6
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29 /home/xx/anaconda3/bin/../lib
ln -s /home/xx/anaconda3/bin/../lib/libstdc++.so.6.0.29 /home/xx/anaconda3/bin/../lib/libstdc++.so.6
 strings /home/xx/anaconda3/bin/../lib/libstdc++.so.6 | grep GLIBCXX_3.4.29                                     1 main!?
GLIBCXX_3.4.29
        

My ERROR was
/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.29' not found
In this case, I was able to solve the problem by copying the anaconda lib.

  • strings /home/xx/anaconda3/envs/xx/lib/libstdc++.so.6 | grep GLIBCXX to confirm that GLIBCXX_3.4.29 exists in one of your environments.
  • rm /lib/x86_64-linux-gnu/libstdc++.so.6
  • cp /home/xx/anaconda3/envs/xx/lib/libstdc++.so.6 /lib/x86_64-linux-gnu
  • @chfritz I have same issue as @modu001 . I git cloned repo and install it as package in my conda environment. But why does package .so file looks for this libstdc++.so.6 system-wide, why it does not look at the same file but in conda directory? I grep it and it contains GLIBCXX_3.4.29, but system-wide .so file does not contain it.

    I also had an error with Jupyter after that:
    ImportError: cannot import name 'AstRenderer' from 'mistune.renderers'

    but it was solved with:
    pip install mistune --upgrade

    I hope it will help somebody

    I have a suggestion for all who encountered this issue:
    Please first check the message after required by.
    In my case, this version of GLIBCXX_3.4.29 is required by xxx/miniconda3/envs/internlp/lib/python3.10/site-packages/pandas/_libs/window/aggregations.cpython-310-x86_64-linux-gnu.so, which is not the same case as the one the blogger encountered.
    As a result, I don't need to change the soft links.
    All I need to do is just pip install --upgrade pandas.