ImportError: /opt/ohpc/pub/compiler/gcc/9.4.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/matplotlib/_path.cpython-39-x86_64-linux-gnu.so) ^CTraceback (most recent call last): File "/share/home/xiatian/ai_studio/trained_models/FEDformer/run.py", line 5, in from exp.exp_main import Exp_Main File "/share/home/xiatian/ai_studio/trained_models/FEDformer/exp/exp_main.py", line 8, in from data_provider.data_factory import data_provider File "/share/home/xiatian/ai_studio/trained_models/FEDformer/data_provider/data_factory.py", line 1, in from data_provider.data_loader import Dataset_ETT_hour, Dataset_ETT_minute, Dataset_Custom, Dataset_Pred File "/share/home/xiatian/ai_studio/trained_models/FEDformer/data_provider/data_loader.py", line 3, in import pandas as pd File "/share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/pandas/init.py", line 48, in from pandas.core.api import ( File "/share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/pandas/core/api.py", line 48, in from pandas.core.groupby import ( File "/share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/pandas/core/groupby/init.py", line 1, in from pandas.core.groupby.generic import ( File "/share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 70, in from pandas.core.frame import DataFrame File "/share/home/xiatian/.conda/envs/FED/lib/python3.9/site-packages/pandas/core/frame.py", line 193, in from pandas.core.series import Series File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 846, in exec_module File "", line 978, in get_code File "", line 647, in _compile_bytecode
问了copilot还有GPT,显示是这个错误是由于环境中的 libstdc++.so.6 库版本过低,而Python 程序需要更高版本的 GLIBCXX(这是 libstdc++.so.6 库中的一个版本),由于是服务器上运行代码,并没有管理员权限。
(FED) [xiatian@login01 FEDformer]$ find / -name libstdc++.so.6 2>/dev/null /usr/lib64/libstdc++.so.6 /opt/ohpc/pub/compiler/gcc/9.4.0/lib64/libstdc++.so.6 /share/home/share/module/perl/x86_64-conda-linux-gnu/lib/libstdc++.so.6 /share/home/share/module/perl/lib/libstdc++.so.6 /share/home/share/module/plink/lib/libstdc++.so.6 /share/home/share/module/torch_cuda11.7/lib/libstdc++.so.6 /share/home/share/module/torch_cpu/lib/libstdc++.so.6 /share/home/share/module/conda/lib/libstdc++.so.6
最后重新建了一个虚拟环境,不单独安装matplotlib才能跑动代码。