ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/user01/software/anaconda3/envs/water/lib/python3.8/site-packages/pandas/_libs/window/aggregations.cpython-38-x86_64-linux-gnu.so)

 

1、首先,用 find / -name "libstdc++.so*" 命令查找包含“libstdc++.so”的所有文件;

2、假定找到的其中一个在  /home/user01/software/anaconda3/lib/libstdc++.so  路径下,
用命令  strings /home/user1/software/anaconda3/lib/libstdc++.so | grep GLIBCXX  ,
查看 GLIBC 是否高于或等于GLIBCXX_3.4.21 ,如果是的话,到第3步

3、找到以后用

export LD_LIBRARY_PATH=/home/user1/software/anaconda3/lib/:$LD_LIBRARY_PATH